using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Variables;

public class ChestController : MonoBehaviour
{

    [SerializeField, Header("References")]
    private Animator m_chestAnimator;

    [SerializeField]
    private Reference<bool> m_freezePlayer;

    [SerializeField]
    private Reference<bool> m_isVictory;

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            m_chestAnimator.SetBool("Open", true);
            m_freezePlayer.Value = true;
            m_isVictory.Value = true;
        }




    }
}
