public static void OnGameLevel_EnterReturn(byte[] buffer) { GameLevel_EnterReturnProto proto = GameLevel_EnterReturnProto.GetProto(buffer); #if DEBUG_LOG_PROTO Debug.Log("<color=#00eaff>接收消息:</color><color=#00ff9c>" + proto.ProtoEnName + " " + proto.ProtoCode + "</color>"); Debug.Log("<color=#c5e1dc>==>>" + JsonUtility.ToJson(proto) + "</color>"); #endif }
private void GameLevel_EnterReturnProtoCallBack(byte[] p) { GameLevel_EnterReturnProto proto = GameLevel_EnterReturnProto.ToProto(p); if (proto.IsSucess) { SceneMgr.Instance.LoadGameLevel(m_GameLevelSceneId, m_Garade); } }
public static GameLevel_EnterReturnProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { GameLevel_EnterReturnProto proto = new GameLevel_EnterReturnProto(); proto.IsSucess = ms.ReadBool(); return(proto); } }
public static GameLevel_EnterReturnProto GetProto(byte[] buffer) { GameLevel_EnterReturnProto proto = new GameLevel_EnterReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.IsSuccess = ms.ReadBool(); if (!proto.IsSuccess) { proto.MsgCode = ms.ReadInt(); } } return(proto); }
public static GameLevel_EnterReturnProto GetProto(byte[] buffer) { GameLevel_EnterReturnProto proto = new GameLevel_EnterReturnProto(); using (MMoMemorySteam ms = new MMoMemorySteam(buffer)) { proto.IsSuccess = ms.ReadBool(); if (!proto.IsSuccess) { proto.MessageId = ms.ReadShort(); } } return(proto); }
public static GameLevel_EnterReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer) { GameLevel_EnterReturnProto proto = new GameLevel_EnterReturnProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.IsSuccess = ms.ReadBool(); if (!proto.IsSuccess) { proto.MsgCode = ms.ReadInt(); } return(proto); }