Пример #1
0
 public void UnbindListener(TofuEvent evnt, Action <EventPayload> action, IEventContext evntContext)
 {
     evntContext.ContextRemoveEventListener(evnt, this);
     if (action != null && _boundListeners != null && _boundListeners.ContainsKey(evnt) && _boundListeners[evnt].Contains(action))
     {
         _boundListeners[evnt].Remove(action);
     }
 }
Пример #2
0
 public void UnbindListener(TofuEvent evnt, Action <EventPayload> action, IEventContext evntContext)
 {
     evntContext.ContextRemoveEventListener(evnt, this);
     if (_listenersToUnbind == null)
     {
         _listenersToUnbind = new Dictionary <TofuEvent, Action <EventPayload> >();
     }
     if (!_listenersToUnbind.ContainsKey(evnt))
     {
         _listenersToUnbind.Add(evnt, action);
     }
 }
Пример #3
0
 public void UnbindListener(TofuEvent evnt, Action <EventPayload> action, IEventContext evntContext)
 {
     evntContext.ContextRemoveEventListener(evnt, this);
     _boundListeners[evnt].Remove(action);
 }