Inheritance: global::ProtoBuf.IExtensible
Exemplo n.º 1
0
        private void EGMI_ACK_SWAP_SCENE(MsgHead head, MemoryStream stream)
        {
            mNet.mPlayerState = NFNet.PLAYER_STATE.E_PLAYER_GAMEING;

            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

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

            //NFCRenderInterface.Instance.LoadScene(xData.scene_id, xData.x, xData.y, xData.z);
        }
Exemplo n.º 2
0
        public void RequireSwapScene(int nTransferType, int nSceneID)
        {
            NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
            xData.TransferType = nTransferType;
            xData.SceneId      = nSceneID;
            xData.LineId       = -1;

            mxBody.SetLength(0);
            xData.WriteTo(mxBody);


            SendMsg((int)NFMsg.EGameMsgID.ReqSwapScene, mxBody);
        }
Exemplo n.º 3
0
    public void RequireSwapScene(NFrame.NFGUID objectID, int nTransferType, int nSceneID, int nLineIndex)
    {
        NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
        xData.transfer_type = (NFMsg.ReqAckSwapScene.EGameSwapType)nTransferType;
        xData.scene_id      = nSceneID;
        xData.line_id       = nLineIndex;

        MemoryStream stream = new MemoryStream();

        Serializer.Serialize <NFMsg.ReqAckSwapScene>(stream, xData);

        SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SWAP_SCENE, stream);
    }
Exemplo n.º 4
0
        public void RequireSwapScene(NFrame.NFGUID objectID, int nTransferType, int nSceneID)
        {
            NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
            xData.transfer_type = (NFMsg.ReqAckSwapScene.EGameSwapType)nTransferType;
            xData.scene_id      = nSceneID;
            xData.line_id       = -1;

            mxBody.SetLength(0);
            mxSerializer.Serialize(mxBody, xData);


            SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SWAP_SCENE, mxBody);
        }
Exemplo n.º 5
0
        private void EGMI_ACK_SWAP_SCENE(NFMsg.MsgBase xMsg)
        {
            NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ReqAckSwapScene)) as NFMsg.ReqAckSwapScene;

            Debug.Log("SWAP_SCENE: " + xData.scene_id);

            NFMsg.AckMiningTitle xTileData = new NFMsg.AckMiningTitle();
            if (null != xData.data && xData.data.Length > 0)
            {
                xTileData = mxSerializer.Deserialize(new MemoryStream(System.Text.Encoding.Default.GetBytes(xData.data)), null, typeof(NFMsg.AckMiningTitle)) as NFMsg.AckMiningTitle;
            }
            NFRender.Instance.LoadScene(xData.scene_id, xData.x, xData.y, xData.z, xTileData);
        }
Exemplo n.º 6
0
        private void OnSwapScene(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

            mUIModule.ShowUI <UIMain>();

            NFDataList var = new NFDataList();
            NFVector3  v   = new NFVector3(xData.x, xData.y, xData.z);

            var.AddInt(xData.scene_id);
            var.AddVector3(v);

            mEventModule.DoEvent((int)Event.SwapScene, var);
        }
Exemplo n.º 7
0
        private void EGMI_ACK_SWAP_SCENE(NFMsg.MsgBase xMsg)
        {
            NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ReqAckSwapScene)) as NFMsg.ReqAckSwapScene;

            Debug.Log("SWAP_SCENE: " + xData.scene_id + " " + xData.x + "," + xData.y + "," + xData.z);

            NFMsg.AckMiningTitle xTileData = new NFMsg.AckMiningTitle();
            if (null != xData.data && xData.data.Length > 0)
            {
                xTileData = mxSerializer.Deserialize(new MemoryStream(xData.data), null, typeof(NFMsg.AckMiningTitle)) as NFMsg.AckMiningTitle;
            }

            NFRender.Instance.LoadScene(xData.scene_id, xData.x, xData.y, xData.z, xTileData);
            //重置主角坐标到出生点
        }
Exemplo n.º 8
0
        private void OnSwapScene(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

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

            mUIModule.ShowUI <UIMain>();

            NFDataList var = new NFDataList();
            NFVector3  v   = new NFVector3(xData.x, xData.y, xData.z);

            var.AddInt(xData.scene_id);
            var.AddVector3(v);

            mEventModule.DoEvent((int)Event.SwapScene, var);
        }
Exemplo n.º 9
0
        private void EGMI_ACK_SWAP_SCENE(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

            Debug.Log("SWAP_SCENE: " + xData.SceneId + " " + xData.X + "," + xData.Y + "," + xData.Z);

            /*
             * NFMsg.AckMiningTitle xTileData = null;
             * if (null != xData.Data && xData.Data.Length > 0)
             * {
             *  xTileData = NFMsg.AckMiningTitle.Parser.ParseFrom(xData.Data);
             * }
             */
            mSceneModule.LoadScene(xData.SceneId, xData.X, xData.Y, xData.Z, "");

            //重置主角坐标到出生点
        }
Exemplo n.º 10
0
        private void EGMI_ACK_SWAP_SCENE(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

            Debug.Log("SWAP_SCENE: " + xData.scene_id + " " + xData.x + "," + xData.y + "," + xData.z);

            /*
             * NFMsg.AckMiningTitle xTileData = null;
             * if (null != xData.data && xData.data.Length > 0)
             * {
             *  xTileData = NFMsg.AckMiningTitle.Parser.ParseFrom(xData.data);
             * }
             */
            //mSceneModule.LoadScene(xData.scene_id, xData.x, xData.y, xData.z, "");

            //重置主角坐标到出生点
        }
Exemplo n.º 11
0
        private void EGMI_ACK_SWAP_SCENE(MsgHead head, MemoryStream stream)
        {
            mNet.mPlayerState = NFNet.PLAYER_STATE.E_PLAYER_GAMEING;

            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

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

            //NFCRenderInterface.Instance.LoadScene(xData.scene_id, xData.x, xData.y, xData.z);
        }
Exemplo n.º 12
0
    public void RequireSwapScene(NFCoreEx.NFIDENTID objectID, int nTransferType, int nSceneID, int nLineIndex)
    {
        NFMsg.ReqAckSwapScene xData = new NFMsg.ReqAckSwapScene();
        xData.transfer_type = (NFMsg.ReqAckSwapScene.EGameSwapType)nTransferType;
        xData.scene_id = nSceneID;
        xData.line_id = nLineIndex;

        MemoryStream stream = new MemoryStream();
        Serializer.Serialize<NFMsg.ReqAckSwapScene>(stream, xData);

        SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SWAP_SCENE, stream);
    }