Exemplo n.º 1
0
        public void RequireSwapScene(AFCoreEx.AFIDENTID objectID, int nTransferType, int nSceneID, int nLineIndex)
        {
            AFMsg.ReqAckSwapScene xData = new AFMsg.ReqAckSwapScene();
            xData.TransferType = (AFMsg.ReqAckSwapScene.Types.EGameSwapType)nTransferType;
            xData.SceneId      = nSceneID;
            xData.LineId       = nLineIndex;

            SendMsg(objectID, AFMsg.EGameMsgID.EgmiReqSwapScene, xData);
        }
Exemplo n.º 2
0
        private void EGMI_ACK_SWAP_SCENE(MsgHead head, MemoryStream stream)
        {
            mxPlayerNet.ChangePlayerState(PlayerNet.PLAYER_STATE.E_PLAYER_GAMEING);

            AFMsg.ReqAckSwapScene xData = new AFMsg.ReqAckSwapScene();
            xData = AFMsg.ReqAckSwapScene.Parser.ParseFrom(stream);
            //ReceiveMsg(stream, ref xData);

            //AFCRenderInterface.Instance.LoadScene(xData.scene_id, xData.x, xData.y, xData.z);

            AFCDataList varList = new AFCDataList();

            varList.AddInt64(xData.SceneId);
            varList.AddFloat(xData.X);
            varList.AddFloat(xData.Y);
            varList.AddFloat(xData.Z);

            AFCLogicEvent.Instance.DoEvent((int)ClientEventDefine.EventDefine_Swap_Scene, varList);
        }