Ejemplo n.º 1
0
 public void RemoveEvent(EvtID id, EventAction action)
 {
     if (_Listeners.ContainsKey(id))
     {
         _Listeners[id] -= action;
     }
 }
Ejemplo n.º 2
0
 public static void TriggerEvent(EvtID id, object param)
 {
     if (_EventMgr != null)
     {
         _EventMgr.Trigger(id, param);
     }
 }
Ejemplo n.º 3
0
 public static void RemoveEvent(EvtID id, EventAction action)
 {
     if (_EventMgr != null)
     {
         _EventMgr.RemoveEvent(id, action);
     }
 }
Ejemplo n.º 4
0
 public static void ListenEvent(EvtID id, EventAction action)
 {
     if (_EventMgr != null)
     {
         _EventMgr.ListenEvent(id, action);
     }
 }
Ejemplo n.º 5
0
 public void ListenEvent(EvtID id, EventAction action)
 {
     if (_Listeners.ContainsKey(id))
     {
         _Listeners[id] += action;
     }
     else
     {
         _Listeners.Add(id, new EventAction(action));
     }
 }
Ejemplo n.º 6
0
 public Event(EvtID id, object parm)
 {
     _Id    = id;
     _Param = parm;
 }
Ejemplo n.º 7
0
        public void Trigger(EvtID id, object param)
        {
            Event evt = new Event(id, param);

            _EventPool.Enqueue(evt);
        }