Example #1
0
 /// <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);
 }
Example #2
0
 /// <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);
 }
Example #3
0
        /// <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);
        }
Example #4
0
        /// <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);
        }
Example #5
0
 /// <summary>
 /// Removes external event listener.
 /// </summary>
 /// <param name="observer">Event listener.</param>
 public void RemoveDebugListener(IEcsSystemsDebugListener observer)
 {
     _debugListeners.Remove(observer);
 }
Example #6
0
 /// <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);
 }
Example #7
0
 /// <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);
 }