void Start() { saveScoreButton.SetActive(false); sceneLoader = FindObjectOfType <SceneLoader>(); InvokeRepeating("addBonusGhost", 0, spawnTime); ghosts = FindObjectsOfType <Ghost>(); AudioSource.PlayClipAtPoint(startGame, Camera.main.transform.position); ghostHiveMind = FindObjectOfType <GhostHiveMind>(); Invoke("AssignFruit", 2); lifeImage = livesImages[0]; highscoreText.text = null; readyText.text = "READY!"; StartCoroutine(WaitAndRemoveText()); pacman = FindObjectOfType <Pacman>(); }
void Start() { StartCoroutine(WaitAndLoad()); ghostHiveMind = FindObjectOfType <GhostHiveMind>(); ghostHiveMind.AddGhost(this); level = FindObjectOfType <Level>(); level.CountGhosts(); }
void Start() { StartCoroutine(WaitAndLoadStart()); animator = this.GetComponent <Animator>(); ghostHiveMind = FindObjectOfType <GhostHiveMind>(); }