private IEnumerator DoGameOver() { audioPlayer.PlayOneShot(audioOnDeath); shake.Begin(); yield return(new WaitForSeconds(secsDelayOnGameOver)); audioPlayer.Play(gameOverAudio); Score.instance.OnGameOver(); inGameUI.SetActive(false); playerInput.StopPlayerInput(); scoreText.UpdateScore(Score.instance.GetScore()); highScoreText.UpdateScore(Score.instance.GetHighScore()); gameOverUI.SetActive(true); }