Esempio n. 1
0
 public void UpdateScore(int score)
 {
     _currentScore += score;
     PlayerPreferenceManager.SetScore(_currentScore);
     scoreCounter.text = _currentScore.ToString("D11");
     if (_currentScore > PlayerPreferenceManager.GetHighscore())
     {
         UpdateHighScore(score);
     }
 }
Esempio n. 2
0
    void Start()
    {
        PlayerPreferenceManager.SetScore(_currentScore);

        if (PlayerPreferenceManager.GetHighscore() > 0)
        {
            _highScore = PlayerPreferenceManager.GetHighscore();
        }
        else
        {
            PlayerPreferenceManager.SetHighscore(9000);
            _highScore = 9000;
        }

        this.UpdateHighScore(_highScore);
    }