public void UnregisterObserver(ITargetObserver ob) { if (obs.Contains(ob)) { obs?.Remove(ob); } }
void Start() { if (_targetObserverObject.TryGetComponent(out ITargetObserver targetObserver)) { _targetObserver = targetObserver; } }
public void RegisterObserver(ITargetObserver ob) { if (!obs.Contains(ob) && ob != null) { obs?.Add(ob); } }
public void UnregisterObserver(ITargetObserver ob) { lock (_locker) { if (Observers.Contains(ob)) { Observers?.Remove(ob); } } }
public void RegisterObserver(ITargetObserver ob) { lock (_locker) { if (!Observers.Contains(ob) && ob != null) { Observers?.Add(ob); } } }
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); }
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); }