public void RemoveEvent(EvtID id, EventAction action) { if (_Listeners.ContainsKey(id)) { _Listeners[id] -= action; } }
public static void TriggerEvent(EvtID id, object param) { if (_EventMgr != null) { _EventMgr.Trigger(id, param); } }
public static void RemoveEvent(EvtID id, EventAction action) { if (_EventMgr != null) { _EventMgr.RemoveEvent(id, action); } }
public static void ListenEvent(EvtID id, EventAction action) { if (_EventMgr != null) { _EventMgr.ListenEvent(id, action); } }
public void ListenEvent(EvtID id, EventAction action) { if (_Listeners.ContainsKey(id)) { _Listeners[id] += action; } else { _Listeners.Add(id, new EventAction(action)); } }
public Event(EvtID id, object parm) { _Id = id; _Param = parm; }
public void Trigger(EvtID id, object param) { Event evt = new Event(id, param); _EventPool.Enqueue(evt); }