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

        versRight = false;
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("GameController");

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

        versRight = false;
    }
Example #3
0
 // Use this for initialization
 void Start()
 {
     //find reference
     gameController = FindObjectOfType <GameController4>();
 }