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

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

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

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

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