Пример #1
0
 /// <inheritdoc/>
 public void RemoveListener(IAsyncUpdatable updatable)
 {
     if (_updatables != null)
     {
         _updatables.Remove(updatable);
     }
 }
        public void AddToUpdate(IAsyncUpdatable updatableAsync)
        {
            if (updatableAsyncs.Contains(updatableAsync))
            {
                return;
            }

            addQueue.Enqueue(updatableAsync);
        }
        public void RemoveFromUpdate(IAsyncUpdatable updatableAsync)
        {
            if (!updatableAsyncs.Contains(updatableAsync))
            {
                return;
            }

            removeQueue.Enqueue(updatableAsync);
        }
Пример #4
0
        /// <inheritdoc/>
        public void AddListener(IAsyncUpdatable updatable)
        {
            ThrowIfDisposed();

            if (updatable == null)
            {
                throw new ArgumentNullException(nameof(updatable));
            }

            if (_updatables == null)
            {
                _updatables = new List <IAsyncUpdatable>();
            }

            _updatables.Add(updatable);
        }
Пример #5
0
 /// <inheritdoc/>
 public void RemoveListener(IAsyncUpdatable updatable)
 {
     if (_updatables != null)
     {
         if (_updating)
         {
             if (updatable != null)
             {
                 _updatablesToRemove.Add(updatable);
             }
         }
         else
         {
             _updatables.Remove(updatable);
         }
     }
 }