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

        if (PlayerPreferenceManager.GetHighscore() > 0)
        {
            highStoreText.text = PlayerPreferenceManager.GetHighscore().ToString("D11");
        }
        else
        {
            PlayerPreferenceManager.SetHighscore(9000);
            highStoreText.text = 9000.ToString("D11");
        }
    }
Ejemplo n.º 3
0
    void Start()
    {
        PlayerPreferenceManager.SetScore(_currentScore);

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

        this.UpdateHighScore(_highScore);
    }