/// <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); } }
/// <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);