예제 #1
0
파일: MsgLogin.cs 프로젝트: mengtest/fs
        public override void OnRecv()
        {
            if (eno == 0)
            {
                Debug.Log("无角色,跳转创建界面");
                LoginModule login = (LoginModule)LayoutMgr.Inst.GetLogicModule(LogicModuleIndex.eLM_PanelLogin);
                login.SetVisible(false);
                CreateRoleModule cRole = (CreateRoleModule)LayoutMgr.Inst.GetLogicModule(LogicModuleIndex.eLM_PanelCreate);
                cRole.SetVisible(true);
            }
            else if (eno == 1)
            {
                LoginModule login = (LoginModule)LayoutMgr.Inst.GetLogicModule(LogicModuleIndex.eLM_PanelLogin);
                login.SetVisible(false);
                Debug.Log("有角色,直接进入大厅");
                SC_PlayerPublicData data = GetData <SC_PlayerPublicData>(structBytes);
                Debug.Log(data.name);
                Debug.Log(data.occ);
                Debug.Log(data.x);
                Debug.Log(data.y);
                Debug.Log(data.dir);

                EnterMainUI(data);
            }
            else if (eno == -1)
            {
                Debug.Log("服务器数据异常");
            }
        }
예제 #2
0
        public override void OnRecv()
        {
            if (eno == 0)
            {
                CreateRoleModule cRole = (CreateRoleModule)LayoutMgr.Inst.GetLogicModule(LogicModuleIndex.eLM_PanelCreate);
                cRole.SetVisible(false);

                Debug.Log("创建角色成功,直接进入大厅");
                SC_PlayerPublicData data = GetData <SC_PlayerPublicData>(structBytes);
                Debug.Log(data.name);
                Debug.Log(data.occ);
                Debug.Log(data.x);
                Debug.Log(data.y);
                Debug.Log(data.dir);



                MsgLogin.EnterMainUI(data);
            }
            else if (eno == -1)
            {
                Debug.Log("创建角色失败");
            }
        }