public void GameOver() { int score = scoreManager.GetScore(); if (score > highscore) { highscore = score; PlayerPrefs.SetInt("highscore", highscore); } highscoreText.text = "Best: " + highscore.ToString(); endGame = true; gameOverText.gameObject.SetActive(true); highscoreText.gameObject.SetActive(true); }