예제 #1
0
 private void _RemoveEvent()
 {
     if (__listener != null)
     {
         foreach (var pair in __listener)
         {
             EventDispatcher.GetInstance().RemoveListener(pair.Item1, pair.Item2);
         }
     }
 }
예제 #2
0
 public void AddEventListener(int eventId, EventCallback1 listener)
 {
     EventDispatcher.GetInstance().AddListener(eventId, listener);
     __listener = (__listener != null) ? __listener : new List <Tuple <int, EventCallback1> >();
     __listener.Add(new Tuple <int, EventCallback1>(eventId, listener));
 }