HighScore.Start C# (CSharp) Méthode

Start() public méthode

public Start ( ) : void
Résultat void
    void Start()
    {
        scoreText = this.GetComponent<Text>();
        //track high score of max floor reached in nightmare tower

        if (!PlayerPrefs.HasKey("HighScore"))
        {
            PlayerPrefs.SetInt("HighScore", 0);
        }
        highScore = PlayerPrefs.GetInt("HighScore");
        scoreText.text = highScore.ToString();
    }