Ejemplo n.º 1
0
 /// <summary>
 /// Unregisters a listener to this event.
 /// </summary>
 /// <param name="listener">The event listener that will be removed.</param>
 public virtual void RemoveListener(ES_EventListener listener)
 {
     if (listeners.Contains(listener))
     {
         listeners.Remove(listener);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers a new listener to this event. A listener cannot subscribe to an event more than once.
 /// </summary>
 /// <param name="listener">The event listener that wants to listen to this event.</param>
 public virtual void AddListener(ES_EventListener listener)
 {
     if (!listeners.Contains(listener))
     {
         listeners.Add(listener);
     }
 }