public void PlayerDeath() { playerIsAlive = false; Destroy(player.gameObject); playerScore.GameOver(); StartCoroutine(GameOverLoadMainMenu()); }
// Update is called once per frame void Update() { time += Time.deltaTime; if (time >= finishTime) { score.GameOver(); } else { UpdateTimer(); } }