/// <summary> /// Adds external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void AddDebugListener(IEcsSystemsDebugListener observer) { if (_debugListeners.Contains(observer)) { throw new Exception("Listener already exists"); } _debugListeners.Add(observer); }
/// <summary> /// Removes external event listener. /// </summary> /// <param name="listener">Event listener.</param> public void RemoveDebugListener(IEcsSystemsDebugListener listener) { if (listener == null) { throw new Exception("listener is null"); } _debugListeners.Remove(listener); }
/// <summary> /// Removes external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void RemoveDebugListener(IEcsSystemsDebugListener observer) { #if DEBUG if (observer == null) { throw new Exception("observer is null"); } #endif _debugListeners.Remove(observer); }
/// <summary> /// Adds external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void AddDebugListener(IEcsSystemsDebugListener observer) { #if DEBUG if (observer == null) { throw new Exception("observer is null"); } if (_debugListeners.Contains(observer)) { throw new Exception("Listener already exists"); } #endif _debugListeners.Add(observer); }
/// <summary> /// Removes external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void RemoveDebugListener(IEcsSystemsDebugListener observer) { _debugListeners.Remove(observer); }
/// <summary> /// Removes external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void RemoveDebugListener(IEcsSystemsDebugListener observer) { Internals.EcsHelpers.Assert(observer != null, "observer is null"); _debugListeners.Remove(observer); }
/// <summary> /// Adds external event listener. /// </summary> /// <param name="observer">Event listener.</param> public void AddDebugListener(IEcsSystemsDebugListener observer) { Internals.EcsHelpers.Assert(observer != null, "observer is null"); Internals.EcsHelpers.Assert(!_debugListeners.Contains(observer), "Listener already exists"); _debugListeners.Add(observer); }