public void GameOver() { if (state == GameState.GameOver) { return; } ground.OnGameOver(); state = GameState.GameOver; birdController.Fall(); audioPlayer.GameOver(); bool isHighScore = points > highScore; if (isHighScore) { highScore = points; PlayerPrefs.SetInt("highScore", highScore); } hudController.GameOver(isHighScore); }