void Start() { highStoreText = GetComponent <Text>(); if (PlayerPreferenceManager.GetHighscore() > 0) { highStoreText.text = PlayerPreferenceManager.GetHighscore().ToString("D11"); } else { PlayerPreferenceManager.SetHighscore(9000); highStoreText.text = 9000.ToString("D11"); } }
void Start() { PlayerPreferenceManager.SetScore(_currentScore); if (PlayerPreferenceManager.GetHighscore() > 0) { _highScore = PlayerPreferenceManager.GetHighscore(); } else { PlayerPreferenceManager.SetHighscore(9000); _highScore = 9000; } this.UpdateHighScore(_highScore); }
public void UpdateHighScore(int score) { _highScore = score; PlayerPreferenceManager.SetHighscore(_highScore); highScoreCounter.text = _highScore.ToString("D11"); }