You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
namespace Script.FrameWork.EventSystem
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class EventManager
|
|
|
|
|
|
{
|
|
|
|
|
|
private static EventDispatcher _eventDispatcher = new EventDispatcher();
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddEventListener(int eventKey, object obj, Dispatcher handler)
|
|
|
|
|
|
{
|
|
|
|
|
|
_eventDispatcher.AddEventListener(eventKey, obj, handler);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddUniqueEventListener(int eventKey, object obj, Dispatcher handler)
|
|
|
|
|
|
{
|
|
|
|
|
|
_eventDispatcher.AddUniqueEventListener(eventKey, obj, handler);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void RemoveEventListener(int eventKey, object obj)
|
|
|
|
|
|
{
|
|
|
|
|
|
_eventDispatcher.RemoveEventListener(eventKey, obj);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void TriggerEventListener(int eventKey, EventArgs eventArgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
_eventDispatcher.TriggerEventListener(eventKey, eventArgs);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|