Inheritance: global::ProtoBuf.IExtensible
Beispiel #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);
        }
        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);
            //可以播放过图动画场景
        }
Beispiel #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>();
        }
        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);
            }
        }
        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();
            }
        }
Beispiel #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");
            }
        }
Beispiel #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");
            }
        }
Beispiel #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 ");
            }
        }
Beispiel #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 ");
            }
        }
Beispiel #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 ");
            }
        }
Beispiel #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);
            }
        }
Beispiel #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();
            }
        }
Beispiel #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);
            }
        }
        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 ");
            }
        }
        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");
            }
        }
Beispiel #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");
            }
        }
        // 接收消息
        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);
            }
        }
Beispiel #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 ");
            }
        }
Beispiel #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");
            }
        }
Beispiel #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);
            }
        }
Beispiel #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);
        }
        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);
            }
        }
        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();
            }
        }