// Update is called once per frame void LateUpdate() { if (destructionScore == maxDestruction) { UIScript.GameOver(); } }
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(); } }