示例#1
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");
        }
    }
示例#2
0
    void Start()
    {
        PlayerPreferenceManager.SetScore(_currentScore);

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

        this.UpdateHighScore(_highScore);
    }
示例#3
0
 public void UpdateHighScore(int score)
 {
     _highScore = score;
     PlayerPreferenceManager.SetHighscore(_highScore);
     highScoreCounter.text = _highScore.ToString("D11");
 }