Example #1
0
 public bool destroy()
 {
     GlobalEventSource.getInstance().removeListener(16, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(11, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(17, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(19, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(18, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(20, BossAIEventListener.getInstance());
     return(true);
 }
Example #2
0
 public bool initialize()
 {
     GlobalEventSource.getInstance().registerListener(16, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(11, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(17, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(19, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(18, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(20, BossAIEventListener.getInstance());
     return(true);
 }
Example #3
0
        public bool destroy()
        {
            //向事件源删除监听器
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterBirthOn, BossAIEventListener.getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterDead, BossAIEventListener.getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterInjured, BossAIEventListener.getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterAttacked, BossAIEventListener.getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterBlooadChanged, BossAIEventListener.getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterLivingTime, BossAIEventListener.getInstance());

            return(true);
        }