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); } }
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); } }
public void UnbindListener(TofuEvent evnt, Action <EventPayload> action, IEventContext evntContext) { evntContext.ContextRemoveEventListener(evnt, this); _boundListeners[evnt].Remove(action); }