public void detach(ISplObserver observer) { foreach (var elem in _observers) { if (elem == observer) { _observers.Remove(observer); Debug.Log("Subject: Detached an observer.\n"); break; } } }
public void attach(ISplObserver observer) { Debug.Log("Subject: Attached an observer.\n"); this._observers.Add(observer); }