MapTable.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Generate By EToy
  2. // Don't Edit It!!
  3. using XGame.Framework.Database;
  4. using XGame.Framework.Serialization;
  5. namespace XGame.Database
  6. {
  7. /// <summary> Map </summary>
  8. public sealed class MapTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. /// <summary> 主键 </summary>
  12. public int Id { get; private set; }
  13. /// <summary> 地图名字 </summary>
  14. public string Name { get; private set; }
  15. /// <summary> 资源名字 </summary>
  16. public string AssetName { get; private set; } // c
  17. /// <summary> 玩家出生点 </summary>
  18. public Vec3 PlayerBirth { get; private set; }
  19. /// <summary> 初始战斗地点,Chapter.part==1的位置 </summary>
  20. public Vec3 BattleFirst { get; private set; }
  21. /// <summary> 怪物出生点,一个取中间,2个左右对称偏移 </summary>
  22. public Vec3 MonsterBirth { get; private set; }
  23. /// <summary> 每个章节向前移动的距离 </summary>
  24. public Vec3 PartMove { get; private set; }
  25. void ISerializable.Deserialize(IReader reader)
  26. {
  27. Id = reader.ReadInt();
  28. Name = reader.ReadString();
  29. AssetName = reader.ReadString();
  30. PlayerBirth = reader.ReadSerializable<Vec3>();
  31. BattleFirst = reader.ReadSerializable<Vec3>();
  32. MonsterBirth = reader.ReadSerializable<Vec3>();
  33. PartMove = reader.ReadSerializable<Vec3>();
  34. }
  35. void ISerializable.Serialize(IWriter writer)
  36. {
  37. writer.Write(Id);
  38. writer.Write(Name);
  39. writer.Write(AssetName);
  40. writer.Write(PlayerBirth);
  41. writer.Write(BattleFirst);
  42. writer.Write(MonsterBirth);
  43. writer.Write(PartMove);
  44. }
  45. }
  46. }