예제 #1
0
    public void RegisterObserverByEventType(GameEventType e, GameEventObserver ob)
    {
        GameEventSubject sub = GetGameEventType(e);

        sub.RegisterObserver(ob);
        ob.SetSubject(sub);
    }
예제 #2
0
 public void RemoveObserverByEventType(GameEventType e, GameEventObserver ob)
 {
     GetGameEventType(e).RemoveObserver(ob);
     ob.SetSubject(null);
 }