using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Clock : MonoBehaviour
{
    public int presentNum = 13;
    public int juiceNum = 3;
    public Timer timer;
    public InventoryManager inventoryManager;
    
    void Update()
    {
        if (inventoryManager.PresentAmount == presentNum &&  inventoryManager.JuiceAmount == juiceNum)
        {
            SceneManager.LoadScene("Win");
        }
        else if (timer.remainingTime == 0 || inventoryManager.HealthAmount == 0 )
        {
            SceneManager.LoadScene("Loss");
        }
        
    }
}
