// setup the game void Start() { // set the current time to the startTime specified currentTime = startTime; // set the current ammo to the starting ammo ammo = startAmmo; // get a reference to the GameManager component for use by other scripts if (gm == null) { gm = this.gameObject.GetComponent <GameManagerLvl2>(); } // init scoreboard to 0 mainScoreDisplay.text = "0"; // inactivate the gameOverScoreOutline gameObject, if it is set if (gameOverScoreOutline) { gameOverScoreOutline.SetActive(false); } // inactivate the playAgainButtons gameObject, if it is set if (playAgainButtons) { playAgainButtons.SetActive(false); } // inactivate the nextLevelButtons gameObject, if it is set if (nextLevelButtons) { nextLevelButtons.SetActive(false); } }
// setup the game void Start() { // set the current time to the startTime specified currentTime = startTime; // set the current ammo to the starting ammo ammo = startAmmo; // get a reference to the GameManager component for use by other scripts if (gm == null) gm = this.gameObject.GetComponent<GameManagerLvl2>(); // init scoreboard to 0 mainScoreDisplay.text = "0"; // inactivate the gameOverScoreOutline gameObject, if it is set if (gameOverScoreOutline) gameOverScoreOutline.SetActive (false); // inactivate the playAgainButtons gameObject, if it is set if (playAgainButtons) playAgainButtons.SetActive (false); // inactivate the nextLevelButtons gameObject, if it is set if (nextLevelButtons) nextLevelButtons.SetActive (false); }