예제 #1
0
 protected void ExecuteObservers <TObserver>(Action <TObserver> callback)
 {
     foreach (var observer in Observers.OfType <TObserver>())
     {
         callback(observer);
     }
 }
예제 #2
0
        public V[] GetObservers <V>() where V : IObserveComponent <T>
        {
            if (!isInitialized)
            {
                Debug.LogAssertion(NotYetObservingMessage);
            }

            return(Observers.OfType <V>().ToArray());
        }
예제 #3
0
 protected bool ExecuteCancellableObservers <TObserver>(Func <TObserver, bool> callback)
 {
     return(Observers.OfType <TObserver>().All(callback));
 }