Exemplo n.º 1
0
    //Update called per frame
    void Update()
    {
        if (scoreIncrease)
        {
            scoreCount += pointsPerSeconds * Time.deltaTime;
        }
        if (scoreCount > highScoreCount)
        {
            highScoreCount = scoreCount;
            PlayerPrefs.setFloat("High Score", highScoreCount);
        }

        scoreText.text = "Score: " + Mathf.Round(scoreCount);
        highScoreText  = "High Score: " + Mathf.Round(highScoreCount);
    }