Esempio n. 1
0
    void Update()
    {
        timerText.text = ("" + (int)timeLeft);
        TickTime();
        //Debug.Log(timePaused);

        if ((int)timeLeft <= 0)
        {
            //lose the game
            gameUI.losingScreen();
        }
        // if (timeLeft > 0 && GameObject.Find("MapManager").GetComponent<MapManager>().CheckWinCondition())
        if (timeLeft > 0 && MapManager.instance.CheckWinCondition())
        {
            // timerText.enabled = false;
            gameUI.winningScreen();
        }
    }