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

public class StealingBag : MedicineBottle
{

    protected override void OnEnable()
    {
        if (MedicineButton == null)
            Init();

        MedicineButton.interactable = ResourceManager.Instance.ResourceAmount < GameManager.Instance.ResourceMaxAmount;
        ClickAmount.text = "";
    }

    protected override void OnDisable()
    {
        ClickAmount.text = "";
    }
    protected override void ButtonClick()
    {
        ResourceManager.Instance.ResourceAmount++;
        StatDecreaseAction.InvokeAction();

        MedicineButton.interactable = ResourceManager.Instance.ResourceAmount < GameManager.Instance.ResourceMaxAmount;
        if (ResourceManager.Instance.ResourceAmount >= GameManager.Instance.ResourceMaxAmount)
        {
            ClickAmount.text = "You're Loaded!";
        }
        else
            ClickAmount.text = "";
    }
}
