Exemple #1
0
 public void EndGame()
 {
     if (!gameHasEnded)
     {
         bool gameHasEnded = true;
         int  currentScore = (int)FindObjectOfType <Score>().score;
         if (PlayerPrefs.GetInt("HighScore") < currentScore)
         {
             PlayerPrefs.SetInt("HighScore", currentScore);
             newHighScore = true;
         }
         gameOverScreen.startGameOverAnimation(currentScore, newHighScore);
         PlayGamesController.PostToLeaderBoard((long)PlayerPrefs.GetInt("HighScore"));
     }
 }
Exemple #2
0
 void Start()
 {
     PlayGamesController.PostToLeaderBoard((long)PlayerPrefs.GetInt("HighScore"));
 }