コード例 #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
ファイル: TofuUiBase.cs プロジェクト: ly774508966/tofu3d
 public void UnbindListener(TofuEvent evnt, Action <EventPayload> action, IEventContext evntContext)
 {
     evntContext.ContextRemoveEventListener(evnt, this);
     _boundListeners[evnt].Remove(action);
 }