using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class CheckLevelAvaiable : MonoBehaviour
{
    Button button;
    EventTrigger eventTrigger;

    private void Awake()
    {
        button = GetComponent<Button>();
        eventTrigger = GetComponent<EventTrigger>();
    }

    void OnEnable()
    {
        button.interactable = PlayerPrefs.GetInt("UnlockLevel2", 0) != 0;
        eventTrigger.enabled = PlayerPrefs.GetInt("UnlockLevel2", 0) != 0;

    }
}
