Esempio n. 1
0
 // Update is called once per frame
 void LateUpdate()
 {
     if (destructionScore == maxDestruction)
     {
         UIScript.GameOver();
     }
 }
Esempio n. 2
0
    private void DisplayTime()
    {
        float timeRemaining  = initialTime - timer;
        int   displayMinutes = (int)(timeRemaining / 60);
        int   displaySeconds = (int)timeRemaining % 60;

        timerText.text = displayMinutes.ToString() + " : " + displaySeconds.ToString();

        if (timeRemaining <= 0)
        {
            UIScript.GameOver();
        }
    }