public void NotifySubject(GameEventType gameEventType)
        {
            IGameEventSubject sub = GetGameEventSubject(gameEventType);

            if (sub == null)
            {
                return;
            }

            sub.Notify();
        }
        public void RemoveObserver(GameEventType gameEventType, IGameEventObserver observer)
        {
            IGameEventSubject sub = GetGameEventSubject(gameEventType);

            if (sub == null)
            {
                return;
            }

            sub.RemoveObserver(observer);
            observer.SetSubject(null);
        }
 public override void SetSubject(IGameEventSubject subject)
 {
     mNewStageSubject = subject as NewStageSubject;
 }
 public override void SetSubject(IGameEventSubject subject)
 {
     mSubject = subject as EnemyKilledSubject;
 }
Пример #5
0
 public override void SetSubject(IGameEventSubject subject)
 {
 }
 public abstract void SetSubject(IGameEventSubject subject);