void Start() { spawner = GameObject.Find("Spawner").GetComponent <MovementDetectionLibrary.SpawnGameObjects>(); sSpawner = GameObject.Find("Spawner").GetComponent <SpawnGameObjectsBall>(); gameM = GameObject.Find("GameManager").GetComponent <GameManagerAtrapalo>(); if (scoreAmount > 0) { textPoint.text = "+" + scoreAmount.ToString(); } else { textPoint.text = scoreAmount.ToString(); } textPoint.color = getColorBall(scoreAmount); }
// setup the game void Start() { panel_count = GameObject.FindWithTag("CountBalls"); panel_count.SetActive(false); side = true; spawner = GameObject.Find("Spawner").GetComponent <SpawnGameObjectsBall>(); spawner.enabled = false; // set the current time to the startTime specified currentTime = startTime; // get a reference to the GameManager component for use by other scripts if (gms == null) { gms = this.gameObject.GetComponent <GameManagerAtrapalo>(); } // init scoreboard to 0 mainScoreDisplay.text = ""; spawner.enabled = false; // 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); } if (countdownDisplayObject) { countdownDisplay = countdownDisplayObject.GetComponent <Text>(); } }