using UnityEngine;
using UnityEngine.SceneManagement;

public class KeyminigameManager : MonoBehaviour
{
    public static KeyminigameManager Instance;

    private int correctCount = 0;
    public int totalKeys = 3;

    private void Awake()
    {
        Instance = this;
    }

    public void CheckWin()
    {
        correctCount++;

        if (correctCount >= totalKeys)
        {
            Debug.Log("WIN");
        }
    }

    public void Fail()
    {
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 1);
    }
}