Beispiel #1
0
    void Update()
    {
        Timer();
        if (!gameOver) // Only update timer when game is not over
        {
            UpdateTimer();
        }

        if (totalTimeSeconds < 0 && !gameOver) // Dont game over if already game over
        {
            gameOver = true;
            endScreenUI.ShowEndScreen(score); // Game over ui

            totalTimeSeconds = 0;             // Set timer to 0 so it doesn't go negative
        }
    }