Beispiel #1
0
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("GameController");

        if (gameControllerObject != null)
        {
            gameController = gameControllerObject.GetComponent <TonysGameCont> ();
        }

        if (gameController == null)
        {
            Debug.Log("Cannot find 'GameController' script");
        }
    }
Beispiel #2
0
 void Start()
 {
     speedUp = GameObject.Find("GameController").GetComponent <TonysGameCont>();
 }