public void StartDeath() { if (!startDeath) { startDeath = true; } if (bonusItem != null) { Destroy(bonusItem.gameObject); bonusItem = null; } Lives.LoseALife(); Lives.UpdateLives(); audioEngine.DeathStart(); GameObject[] ghosts = GameObject.FindGameObjectsWithTag("Ghost"); foreach (GameObject ghost in ghosts) { ghost.GetComponent <GhostController>().canMove = false; } GameObject pacMan = GameObject.Find("Pacman"); pacMan.GetComponent <PacmanController>().canMove = false; pacMan.GetComponent <Animator>().enabled = false; StartCoroutine(ProcessDeathAfter(1.0f)); }