Exemplo n.º 1
0
    void Update()
    {
        if (levelTimer.endLevel)
        {
            this.LevelEnd();
            levelTimer.reset();
        }


        Debug.Log("Timmer : " + (levelTimer.GetElapsed() - (levelTimer.GetElapsed() % 60)) / 60 +
                  ":" + levelTimer.GetElapsed() % 60 + " - EndLevel Status :" + levelTimer.endLevel +
                  " - Limit:" + levelTimer.Limit + " - Counter:" + levelTimer.secCounter);
        Debug.Log("EndLevel Status :" + levelTimer.endLevel);
        if (Input.GetKeyDown(KeyCode.P))
        {
            //set audo snapshot to pause or unpause snapshot
            //pause the game
            Time.timeScale = Time.timeScale == 0 ? 1 : 0;
        }
    }