void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController3"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <GameController3> (); } if (gameControllerObject == null) { Debug.Log("Cannot Find 'GameController' script"); } }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag ("GameController"); if (gameControllerObject != null) { gameController=gameControllerObject.GetComponent<GameController3>(); } if (gameControllerObject == null) { Debug.Log("Cannot find 'GameController' script"); } ennemi = GameObject.FindGameObjectWithTag ("Ennemi_niv3"); player = GameObject.FindGameObjectWithTag ("Player"); Player = GameObject.Find ("Heros"); versRight = false; }
// Use this for initialization void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <GameController3>(); } if (gameControllerObject == null) { Debug.Log("Cannot find 'GameController' script"); } ennemi = GameObject.FindGameObjectWithTag("Ennemi_niv3"); player = GameObject.FindGameObjectWithTag("Player"); Player = GameObject.Find("Heros"); versRight = false; }
// Use this for initialization void Start() { //find reference gameController = FindObjectOfType <GameController3>(); }
public void SetGameControllerReference(GameController3 controller) { gameController3 = controller; }