Exemplo n.º 1
0
 private void RegisterNetEvent()
 {
     mNetMsgQueue = new EventHandlerQueue(NetworkEventProcessor.GetInstance());
     mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginFailed, OnLoginFail);
     mNetMsgQueue.Add((int)NetWorkEventType.NE_NotifyLoginInfo, OnLoginInfo);
     mNetMsgQueue.Add((int)NetWorkEventType.NE_NotifyPlayerInfo, OnPlayerInfo);
 }
Exemplo n.º 2
0
        void RegisterPlayerEvent()
        {
            if (PlayerManager.GetSingleton().pHero != null)
            {
                mPlayerEventQueue = new EventHandlerQueue(PlayerManager.GetSingleton().pHero.pEventManager);
                mPlayerEventQueue.Add((int)PlayerEventType.PE_NotifyMianModeEnd, MianModeEnd);
            }

            if (mNetMsgQueue == null)
            {
                mNetMsgQueue = new EventHandlerQueue(NetworkEventProcessor.GetInstance());
            }

            mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginFailed, OnLoginFail);
        }
Exemplo n.º 3
0
        private void RegisterSceneEvent()
        {
            mScene = SceneMachine.GetCurrentScene() as GameScene;

            if (mScene != null)
            {
                mScene.RegisterSceneEvent(SceneEventType.SE_NotifyTSDKLoginSucceed, TSDKLoginSuccees);
                mScene.RegisterSceneEvent(SceneEventType.SE_NotifyTSDKLoginFail, OnLoginFail);
                mScene.RegisterSceneEvent(SceneEventType.SE_NotifyStartTSDKLogin, OnStartLogin);
                mScene.RegisterSceneEvent(SceneEventType.SE_NotifyVersionUpdate, OnStatrVersionCheck);
                mScene.RegisterSceneEvent(SceneEventType.SE_NotifyConfigCheck, StartConfigCheck);
            }

            mGlobalEventQueue = new EventHandlerQueue(CrossContextEventProcessor.GetInstance());
            mGlobalEventQueue.Add((int)CrossContextEventType.GE_NetWorkState, OnNetWorkState);
        }
Exemplo n.º 4
0
 private void InitNetMsg()
 {
     mNetMsgQueue = new EventHandlerQueue(NetworkEventProcessor.GetInstance());
     mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginSuccess, RspTSDKLoginSuccess);
     mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginFailed, OnLoginFail);
 }