Exemple #1
0
    private void Update()
    {
        // Collectibles Count Update
        if (_cubeCount != PlayerController.CubeCount)
        {
            _cubeCount = PlayerController.CubeCount;
            LevelUI.CollectibleCountText.text = "GOAL: " + _cubeCount + "/" + GameManager.LevelGoal;
        }

        // Level Timer Update
        if (GameManager.TimerCountdown > 0)
        {
            LevelUI.SetTimerSlider(GameManager.TimerCountdown / GameManager.LevelTime);
            if (GameManager.TimerCountdown <= 0)
            {
                LevelUI.SetTimerSlider(0);
            }
        }
    }