SepiaToneEffectSerializer.cs 683 B

123456789101112131415161718192021222324
  1. using System.IO;
  2. namespace COM3D2.MeidoPhotoStudio.Plugin
  3. {
  4. public class SepiaToneEffectSerializer : Serializer<SepiaToneEffectManger>
  5. {
  6. private const short version = 1;
  7. public override void Serialize(SepiaToneEffectManger effect, BinaryWriter writer)
  8. {
  9. writer.Write(SepiaToneEffectManger.header);
  10. writer.WriteVersion(version);
  11. writer.Write(effect.Active);
  12. }
  13. public override void Deserialize(SepiaToneEffectManger effect, BinaryReader reader, SceneMetadata metadata)
  14. {
  15. _ = reader.ReadVersion();
  16. effect.SetEffectActive(reader.ReadBoolean());
  17. }
  18. }
  19. }