using Photon.Pun;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(fileName = "GameEvent_AbilityKeyBinder", menuName = "Wavefunction/Event/New GameEvent AbilityKeyBinder", order = 1)]
public class GameEvent_AbilityKeyBinder : ScriptableObject
{
    private List<GameEventListener_AbilityKeyBinder> listeners = new List<GameEventListener_AbilityKeyBinder>();

    public void Raise(AbilityKeyBinder jobData)
    {
        for (int i = listeners.Count - 1; i >= 0; i--)
        {
            listeners[i].OnEventRaised(jobData);
        }
    }

    public void RegisterListener(GameEventListener_AbilityKeyBinder listener)
    {
        listeners.Add(listener);
    }

    public void UnRegisterListener(GameEventListener_AbilityKeyBinder listener)
    {
        listeners.Remove(listener);
    }
}
