using System;
using UnityEngine;

public class RoomReward : MonoBehaviour
{
    public static event Action<int> DiamondsRewarded;
    public static event Action ChestRewarded;
    public static event Action<int> DamageDealt; 
    
    [SerializeField] private int diamonds;
    [SerializeField] private int damage;
    [SerializeField] private bool chest;

    public void TriggerGetReward()
    {
        if (diamonds > 0)
        {
            DiamondsRewarded?.Invoke(diamonds);
        }

        if (chest)
        {
            ChestRewarded?.Invoke();
        }

        if (damage > 0)
        {
            DamageDealt?.Invoke(damage);
        }
    }
}
