using UnityEngine;
using TMPro;

public class LogicCollectable : Collectable
{
    [SerializeField]
    protected Inventory.Data Collectable;

    [SerializeField]
    protected GameObject BlockMenu;

    [SerializeField]
	protected TextMeshProUGUI popUpText;

    public override void OnCollect(Character character)
    {
        character.Inventory.Add(Collectable);

        if (BlockMenu != null)
        {
            BlockMenu.SetActive(true);
            popUpText.text = Collectable.element.DisplayName.ToUpper();
        }
        Destroy(gameObject);
    }
}