private void GameLevel_VictroyReturnProtoCallBack(byte[] p) { GameLevel_VictoryReturnProto proto = GameLevel_VictoryReturnProto.ToProto(p); if (proto.IsSucess) { Debug.Log("GameLevel_VictoryReturnProto IsSucess"); } }
public static GameLevel_VictoryReturnProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto(); proto.IsSucess = ms.ReadBool(); return(proto); } }
public static GameLevel_VictoryReturnProto GetProto(byte[] buffer) { GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.IsSuccess = ms.ReadBool(); if (!proto.IsSuccess) { proto.MsgCode = ms.ReadInt(); } } return(proto); }
public static GameLevel_VictoryReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer) { GameLevel_VictoryReturnProto proto = new GameLevel_VictoryReturnProto(); 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); }