public void UnregisterObserver(ITargetObserver ob)
 {
     if (obs.Contains(ob))
     {
         obs?.Remove(ob);
     }
 }
Пример #2
0
 void Start()
 {
     if (_targetObserverObject.TryGetComponent(out ITargetObserver targetObserver))
     {
         _targetObserver = targetObserver;
     }
 }
 public void RegisterObserver(ITargetObserver ob)
 {
     if (!obs.Contains(ob) && ob != null)
     {
         obs?.Add(ob);
     }
 }
Пример #4
0
 public void UnregisterObserver(ITargetObserver ob)
 {
     lock (_locker)
     {
         if (Observers.Contains(ob))
         {
             Observers?.Remove(ob);
         }
     }
 }
Пример #5
0
 public void RegisterObserver(ITargetObserver ob)
 {
     lock (_locker)
     {
         if (!Observers.Contains(ob) && ob != null)
         {
             Observers?.Add(ob);
         }
     }
 }
Пример #6
0
        public void UnregisterObserver(ITargetObserver ob)
        {
            if (_obs.Contains(ob))
                _obs?.Remove(ob);

            _clotter?.UnregisterObserver(ob);             //代理凝聚器观察者的反注册
            _trackCorelator.UnregisterObserver(ob);      //代理相关器观察者的反注册 
            _dotCorelator.UnregisterObserver(ob);
            _freeDotDeleter.UnregisterObserver(ob);
            _viewDeleter.UnregisterObserver(ob);
            _clotter47.UnregisterObserver(ob);
        }
Пример #7
0
        public void RegisterObserver(ITargetObserver ob)
        {
            if (!_obs.Contains(ob) && ob != null)
                _obs?.Add(ob);

            _clotter?.RegisterObserver(ob);           //代理凝聚器观察者的注册
            _trackCorelator.RegisterObserver(ob);    //代理相关器观察者的注册 
            _dotCorelator.RegisterObserver(ob);
            _freeDotDeleter.RegisterObserver(ob);
            _viewDeleter.RegisterObserver(ob);
            _clotter47.RegisterObserver(ob);
        }