public static void Serialize(Stream stream, GameAccountState instance) { if (instance.HasGameLevelInfo) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.GameLevelInfo.GetSerializedSize()); GameLevelInfo.Serialize(stream, instance.GameLevelInfo); } if (instance.HasGameTimeInfo) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.GameTimeInfo.GetSerializedSize()); GameTimeInfo.Serialize(stream, instance.GameTimeInfo); } if (instance.HasGameStatus) { stream.WriteByte(26); ProtocolParser.WriteUInt32(stream, instance.GameStatus.GetSerializedSize()); GameStatus.Serialize(stream, instance.GameStatus); } }
public void Serialize(Stream stream) { GameTimeInfo.Serialize(stream, this); }