Beispiel #1
0
    void Update()
    {
        int nScore = 0;

        nScore = calcScore();
        m_textScoreLabel.text = "Score : " + nScore + "m";

        m_lifePanel.updateLife(m_playerController.getLife());

        if (m_playerController.getLife() <= 0)
        {
            enabled = false;

            if (PlayerPrefs.GetInt("HighScore") < nScore)
            {
                PlayerPrefs.SetInt("HighScore", nScore);
            }

            Invoke("ReturnToTitle", 2.0f);
        }
    }