void Awake()
 {
     instance             = this;
     time_slider.maxValue = total_time;
     time_slider.value    = total_time;
     time_left            = total_time;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     Score_Script = FindObjectOfType <Score_Script>();
     allTiles     = new TileBG_Script[width, height];
     allCats      = new GameObject[width, height];
     SetUp();
 }
示例#3
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "Coin")
     {
         Destroy(col.gameObject);
         Score_Script.Plus_Score();
     }
 }
示例#4
0
    //================================================================================================================================================
    //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>();
    }
示例#5
0
    //================================================================================================================================================
    //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>();
    }