This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public class score_manager : MonoBehaviour { | |
public Text txtScore; | |
private int myScore; | |
void Start () { | |
myScore = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
score_manager myScoreManager; | |
void Start() { | |
myScoreManager = GetComponent<score_manager>(); | |
} | |
void OnCollisionEnter(Collision target) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public class NameTag : MonoBehaviour { | |
public string displayName; | |
public Text targetName; | |
private bool isDisplaying = false; | |
void Start() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Button_ColorMe : MonoBehaviour { | |
public GameObject target; | |
public void ChangeYourColor () { | |
var targetMe = target.GetComponent<Renderer>(); | |
targetMe.material.color = Color.green; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class Button_LoadScene : MonoBehaviour { | |
public void LoadScene() { | |
SceneManager.LoadScene("unit2-2"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DB_USER','username'); | |
define('DB_PASSWORD','password'); | |
define('DB_HOST','localhost'); | |
define('DB_NAME','dbname'); | |
$db_connect = @mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die | |
('Could not connect to MYSQL '. mysqli_connect_error()); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class TextFileHandler : MonoBehaviour { | |
public GameObject diaglogBox; | |
public Text dialogText; | |
public TextAsset textFile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def destroy(x1,y1,r1,x2,y2,r2): | |
dist = math.sqrt((x2 - x1)**2 + (y2 - y1)**2) | |
if(dist - (r1+r2) < 0): | |
print("True") | |
else: | |
print("False") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class StateMachine : MonoBehaviour { | |
public Transform player; | |
public Transform TargetObj; | |
private bool isPaused; | |
private Renderer myWeapon; | |
public enum PlayerState { |