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); }
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); }
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); }
private void InitNetMsg() { mNetMsgQueue = new EventHandlerQueue(NetworkEventProcessor.GetInstance()); mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginSuccess, RspTSDKLoginSuccess); mNetMsgQueue.Add((int)NetWorkEventType.NE_LoginFailed, OnLoginFail); }