Наследование: global::ProtoBuf.IExtensible
Пример #1
0
        private void EGMI_ACK_ENTER_GAME(NFMsg.MsgBase xMsg)
        {
            mxNetController.mPlayerState = NFNetController.PLAYER_STATE.E_PLAYER_GAMEING;
            NFCSectionManager.Instance.SetGameState(NFCSection.UI_SECTION_STATE.UISS_GAMEING);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckEventResult)) as NFMsg.AckEventResult;

            NFNetController.Instance.xMainRoleID = NFNetController.PBToNF(xData.event_object);
            NFRender.Instance.LoadScene((int)xData.event_code);
        }
Пример #2
0
        private void EGMI_ACK_ENTER_GAME(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.MsgData);

            Debug.Log("EGMI_ACK_ENTER_GAME " + xData.EventCode.ToString());

            mEventModule.DoEvent((int)NFLoginModule.Event.EnterGameSuccess);
            //mSceneModule.LoadScene((int)xData.event_code);
            //可以播放过图动画场景
        }
Пример #3
0
        private void EGMI_ACK_ENTER_GAME(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.msg_data);

            Debug.Log("EGMI_ACK_ENTER_GAME " + xData.event_code.ToString());

            //mSceneModule.LoadScene((int)xData.event_code);
            //可以播放过图动画场景

            mUIModule.CloseAllUI();
            mUIModule.ShowUI <NFUIMain>();
        }
Пример #4
0
        private void EGMI_ACK_SELECT_SERVER(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                //申请角色列表
                mNet.mxSendLogic.RequireRoleList(mNet.strAccount, mNet.nServerID);
            }
        }
Пример #5
0
        private void EGMI_ACK_LOGIN(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                mNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_PLAYER_LOGIN;

                mNet.mxSendLogic.RequireWorldList();
            }
        }
Пример #6
0
        private void OnConnectKey(int id, MemoryStream stream)
        {
            NFMsg.MsgBase        xMsg  = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.MsgData);

            if (xData.EventCode == EGameEventCode.VerifyKeySuccess)
            {
                Debug.Log("VerifyKey SUCCESS");
                RequireServerList();
            }
            else
            {
                Debug.Log("VerifyKey Failed");
            }
        }
Пример #7
0
        private void OnConnectKey(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase        xMsg  = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.msg_data);

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                Debug.Log("VerifyKey SUCCESS");
                RequireServerList();
            }
            else
            {
                Debug.Log("VerifyKey Failed");
            }
        }
Пример #8
0
        private void OnSelectServer(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.MsgData);

            if (xData.EventCode == EGameEventCode.SelectserverSuccess)
            {
                Debug.Log("SelectGame SUCCESS ");
                mEventModule.DoEvent((int)NFLoginModule.Event.SelectServerSuccess);
            }
            else
            {
                Debug.Log("SelectGame Failed ");
            }
        }
Пример #9
0
        private void OnSelectServer(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.msg_data);

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                Debug.Log("SelectGame SUCCESS ");
                mEventModule.DoEvent((int)NFUIModule.Event.SelectServerSuccess);
            }
            else
            {
                Debug.Log("SelectGame Failed ");
            }
        }
Пример #10
0
        private void EGMI_ACK_SELECT_SERVER(NFMsg.MsgBase xMsg)
        {
            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckEventResult)) as NFMsg.AckEventResult;

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                Debug.Log("SelectGame SUCCESS ");

                Debug.Log("QueryRoleList");

                mxNetController.mxNetSender.RequireRoleList(mxNetController.strAccount, mxNetController.nServerID);
            }
            else
            {
                Debug.Log("SelectGame Failed ");
            }
        }
Пример #11
0
        private void EGMI_ACK_LOGIN(NFMsg.MsgBase xMsg)
        {
            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckEventResult)) as NFMsg.AckEventResult;

            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                Debug.Log("Login  SUCCESS");
                mxNetController.mPlayerState = NFNetController.PLAYER_STATE.E_HAS_PLAYER_LOGIN;

                Debug.Log("Start to QueryWorldList");
                mxNetController.mxNetSender.RequireWorldList();
            }
            else
            {
                Debug.Log("Login Faild,Code: " + xData.event_code);
            }
        }
Пример #12
0
        private void EGMI_ACK_CONNECT_KEY(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                //验证成功
                mNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_VERIFY;
                //mNet.nMainRoleID = PBToNF(xData.event_object);

                //申请世界内的服务器列表
                mNet.mxSendLogic.RequireServerList();
            }
        }
Пример #13
0
        // 接收消息
        private void OnLoginProcess(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase        xMsg  = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.msg_data);

            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                Debug.Log("Login  SUCCESS");
                mEventModule.DoEvent((int)NFLoginModule.Event.LoginSuccess);
            }
            else
            {
                Debug.Log("Login Faild,Code: " + xData.event_code);
                NFDataList varList = new NFDataList();
                varList.AddInt((Int64)xData.event_code);
                mEventModule.DoEvent((int)NFLoginModule.Event.LoginFailure);
            }
        }
Пример #14
0
        private void OnSelectServer(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                Debug.Log("SelectGame SUCCESS ");
                mEventModule.DoEvent((int)NFUIModule.Event.SelectServerSuccess);
            }
            else
            {
                Debug.Log("SelectGame Failed ");
            }
        }
Пример #15
0
        private void OnConnectKey(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                Debug.Log("VerifyKey SUCCESS");
                RequireServerList();
            }
            else
            {
                Debug.Log("VerifyKey Failed");
            }
        }
Пример #16
0
        private void EGMI_ACK_CONNECT_KEY(NFMsg.MsgBase xMsg)
        {
            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckEventResult)) as NFMsg.AckEventResult;

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                Debug.Log("VerifyKey SUCCESS");

                mxNetController.mPlayerState = NFNetController.PLAYER_STATE.E_HAS_VERIFY;

                Debug.Log("QueryGameList");

                mxNetController.mxNetSender.RequireServerList();
            }
            else
            {
                Debug.Log("VerifyKey Failed");
            }
        }
Пример #17
0
        // 接收消息
        private void OnLoginProcess(UInt16 id, MemoryStream stream)
        {
            Debug.Log("OnLoginProcess1");
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            Debug.Log("OnLoginProcess2");
            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize <NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            Debug.Log("OnLoginProcess3");
            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                Debug.Log("Login  SUCCESS");
                mEventModule.DoEvent((int)NFUIModule.Event.LoginSuccess);
            }
            else
            {
                Debug.Log("Login Faild,Code: " + xData.event_code);
                NFDataList varList = new NFDataList();
                varList.AddInt((Int64)xData.event_code);
                mEventModule.DoEvent((int)NFUIModule.Event.LoginFailure);
            }
        }
Пример #18
0
        private void EGMI_ACK_SELECT_SERVER(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize<NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                Debug.Log("SelectGame SUCCESS ");

                Debug.Log("QueryRoleList");
                //申请角色列表
                mNet.mxSendLogic.RequireRoleList(mNet.strAccount, mNet.nServerID);
            }
            else
            {
                Debug.Log("SelectGame Failed ");
            }
        }
Пример #19
0
        private void EGMI_ACK_CONNECT_KEY(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize<NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                Debug.Log("VerifyKey SUCCESS");
                //验证成功
                mNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_VERIFY;
                //mNet.nMainRoleID = PBToNF(xData.event_object);

                Debug.Log("QueryGameList");
                //申请世界内的服务器列表
                mNet.mxSendLogic.RequireServerList();
            }
            else
            {
                Debug.Log("VerifyKey Failed");
            }
        }
Пример #20
0
        private void EGMI_ACK_LOGIN(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize<NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                Debug.Log("Login  SUCCESS");
                mNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_PLAYER_LOGIN;
                Debug.Log("QueryWorldList");
                mNet.mxSendLogic.RequireWorldList();
            }
            else
            {
                Debug.Log("Login Faild,Code: " + xData.event_code);
            }
        }
Пример #21
0
        private void EGMI_EVENT_RESULT(MsgHead head, MemoryStream stream)
        {
            //OnResultMsg
            NFMsg.AckEventResult xResultCode = new NFMsg.AckEventResult();
            xResultCode = Serializer.Deserialize<NFMsg.AckEventResult>(stream);
            NFMsg.EGameEventCode eEvent = xResultCode.event_code;

            mNet.mxBinMsgEvent.DoResultCodeDelegation(eEvent);
        }
Пример #22
0
        private void EGMI_ACK_SELECT_SERVER(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize<NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_SELECTSERVER_SUCCESS)
            {
                //�����ɫ�б�
                mNet.mxSendLogic.RequireRoleList(mNet.strAccount, mNet.nServerID);
            }
        }
Пример #23
0
        private void EGMI_ACK_CONNECT_KEY(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckEventResult xData = new NFMsg.AckEventResult();
            xData = Serializer.Deserialize<NFMsg.AckEventResult>(new MemoryStream(xMsg.msg_data));

            if (xData.event_code == EGameEventCode.EGEC_VERIFY_KEY_SUCCESS)
            {
                //��֤�ɹ�
                mNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_VERIFY;
                //mNet.nMainRoleID = PBToNF(xData.event_object);

                //���������ڵķ������б�
                mNet.mxSendLogic.RequireServerList();
            }
        }