void Awake() { instance = this; time_slider.maxValue = total_time; time_slider.value = total_time; time_left = total_time; }
// Use this for initialization void Start() { Score_Script = FindObjectOfType <Score_Script>(); allTiles = new TileBG_Script[width, height]; allCats = new GameObject[width, height]; SetUp(); }
void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Coin") { Destroy(col.gameObject); Score_Script.Plus_Score(); } }
//================================================================================================================================================ //Unity defined functions // Use this for initialization void Start() { //get the scripts of the game controller object controller = GameObject.Find("GameController"); s_s = controller.GetComponent <Score_Script>(); gc_s = controller.GetComponent <GameControl_Script>(); rb = GetComponent <Rigidbody2D>(); }
//================================================================================================================================================ //Unity defined functions // Use this for initialization void Start() { //get the scripts of the game controller object controller = GameObject.Find("GameController"); s_s = controller.GetComponent<Score_Script>(); gc_s = controller.GetComponent<GameControl_Script>(); rb = GetComponent<Rigidbody2D>(); }