123456789101112131415161718192021222324252627 |
- using System.IO;
- namespace COM3D2.MeidoPhotoStudio.Plugin
- {
- public class AttachPointInfoSerializer : SimpleSerializer<AttachPointInfo>
- {
- private const short version = 1;
- public override void Serialize(AttachPointInfo info, BinaryWriter writer)
- {
- writer.WriteVersion(version);
- writer.Write((int) info.AttachPoint);
- writer.Write(info.MaidIndex);
- }
- public override AttachPointInfo Deserialize(BinaryReader reader, SceneMetadata metadata)
- {
- _ = reader.ReadVersion();
- var attachPoint = (AttachPoint) reader.ReadInt32();
- var maidIndex = reader.ReadInt32();
- return new AttachPointInfo(attachPoint, string.Empty, maidIndex);
- }
- }
- }
|