private void Start() { ConSubject conSubject = new ConSubject(); ConObserver observer1 = new ConObserver(conSubject); ConObserver2 observer2 = new ConObserver2(conSubject); conSubject.Attach(observer1); conSubject.Attach(observer2); conSubject.SetSate("主题辩护啦"); }
public ConObserver2(ConSubject subject) { m_Subject = subject; }