Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     GameObject gameControllerObject = GameObject.FindWithTag ("GameController");
     if (gameControllerObject != null) {
         gameController=gameControllerObject.GetComponent<GameController5>();
     }
     if (gameControllerObject == null) {
         Debug.Log("Cannot find 'GameController' script");
     }
     Player = GameObject.FindGameObjectWithTag ("Player");
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("GameController");

        if (gameControllerObject != null)
        {
            gameController = gameControllerObject.GetComponent <GameController5>();
        }
        if (gameControllerObject == null)
        {
            Debug.Log("Cannot find 'GameController' script");
        }
        Player = GameObject.FindGameObjectWithTag("Player");
    }