예제 #1
0
 /// <summary>
 /// Unregisters an listener from the event.
 /// </summary>
 /// <param name="listener">The listener to remove.</param>
 public void UnregisterListener(CGameEventListener listener)
 {
     if (listeners.Contains(listener.Response))
     {
         listeners.Remove(listener.Response);
     }
 }
 public void UnreagisterLister(CGameEventListener listener)
 {
     if (_listeners.Contains(listener))
     {
         _listeners.Remove(listener);
     }
 }
 public void RegisterLister(CGameEventListener listener)
 {
     if (!_listeners.Contains(listener))
     {
         _listeners.Add(listener);
     }
 }
예제 #4
0
 /// <summary>
 /// Registers a listener to the event.
 /// </summary>
 /// <param name="listener">The listener to register.</param>
 public void RegisterListener(CGameEventListener listener) => listeners.Add(listener.Response);