void Start() { //find refernces for in-game objects turrets = GameObject.FindGameObjectsWithTag(Tags.miniTurrret); cc = GameObject.FindGameObjectWithTag(Tags.crystal).GetComponent<CrystalController>(); pc = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<PlayerController>(); gec = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<GUIElementsController>(); gt = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<GameTimer>(); gameEnded = false; }
void Start() { if (GameObject.FindGameObjectWithTag(Tags.gameController)) { gameController = GameObject.FindGameObjectWithTag(Tags.gameController); pc = gameController.GetComponent<PauseController>(); gec = gameController.GetComponent<GUIElementsController>(); } if (GameObject.FindGameObjectWithTag(Tags.timesDisplay)) { tdc = GameObject.FindGameObjectWithTag(Tags.timesDisplay).GetComponent<TimesDisplayController>(); } }