Exemple #1
0
 private void removeListener()
 {
     GlobalEventSource.getInstance().removeListener(0, JingJiChangPlayerLoginEventListener.getInstnace());
     GlobalEventSource.getInstance().removeListener(1, JingJiChangPlayerLogoutEventListener.getInstnace());
 }
Exemple #2
0
 /// <summary>
 /// 初始化监听器
 /// </summary>
 private void initListener()
 {
     GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLogin, JingJiChangPlayerLoginEventListener.getInstnace());
     GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLogout, JingJiChangPlayerLogoutEventListener.getInstnace());
 }