A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IEntitySerializer.cs 1.4KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using Svelto.ECS;
  3. using Svelto.ECS.Serialization;
  4. using GamecraftModdingAPI.Utility;
  5. namespace GamecraftModdingAPI.Persistence
  6. {
  7. /// <summary>
  8. /// Entity serializer and deserializer interface for storing and retrieving data in a Gamecraft save file (GameSave.GC).
  9. /// </summary>
  10. public interface IEntitySerializer : IDeserializationFactory, IQueryingEntitiesEngine
  11. {
  12. /// <summary>
  13. /// Serialize the entities.
  14. /// </summary>
  15. /// <returns>Whether serialization was successful.</returns>
  16. /// <param name="serializationData">Serialized data to write to (writes to GameSave.GC).</param>
  17. /// <param name="entitiesDB">Entities db for the game.</param>
  18. /// <param name="entitySerializer">Entity serializer with support for single-entity serialization.</param>
  19. bool Serialize(ref ISerializationData serializationData, EntitiesDB entitiesDB, IEntitySerialization entitySerializer);
  20. /// <summary>
  21. /// Deserialize the entities.
  22. /// </summary>
  23. /// <returns>Whether deserialization was successful.</returns>
  24. /// <param name="serializationData">Serialized data to read from (read from GameSave.GC).</param>
  25. /// <param name="entitySerializer">Entity serializer with support for single-entity deserialization.</param>
  26. bool Deserialize(ref ISerializationData serializationData, IEntitySerialization entitySerializer);
  27. }
  28. }