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

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

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

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

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