Example #1
0
    public void setHighscore()
    {
        if (PlayerPrefs.GetInt("Highscore") < point.points)
        {
            PlayerPrefs.SetInt("Highscore", point.points);
            text.text = "Highscore: " + PlayerPrefs.GetInt("Highscore").ToString();
            if (first && point.points > 0)
            {
                first  = false;
                second = true;
                blinkingHighScore();
            }

            if (second)
            {
                sound.playHighscore();
                second = false;
            }
        }
    }