using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class Interactible : MonoBehaviour
{
    [Header("Settings")]
    [SerializeField]
    private bool blocksPlay = false, requireBag = false;
    private bool hasBag = false;
    public bool BlocksPlay { get { return blocksPlay; } }
    public bool HasBag { get { return hasBag; } set { hasBag = value; } }

    [SerializeField] private bool oneShot = false;
    public bool OneShot { get { return oneShot; } }

    [Header("Events")]
    public UnityEvent InteractEvent = new UnityEvent();


    public void Interact()
    {
        if (!requireBag || hasBag)
        InteractEvent.Invoke();
    }
}
