// Shows the OldHighScore panel and loads its information. private void ShowOldHighScore() { CurrentScoreText.text = GameLogic.GetGameLogic().GetScore() + ""; OldHighScoreText.text = PlayerSettings.GetHighScore() + ""; OldHighScore.SetActive(true); NewHighScore.SetActive(false); }
// Check if a New highscore has been achieved or not and display the corresponding panel. public void ShowPanel() { int score = GameLogic.GetGameLogic().GetScore(); int oldHighScore = PlayerSettings.GetHighScore(); if (score > oldHighScore) { ShowNewHighScore(); } else { ShowOldHighScore(); } }