MonsterTable.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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> Monster </summary>
  8. public sealed class MonsterTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. /// <summary> 怪物ID </summary>
  12. public int Id { get; private set; } // sc
  13. /// <summary> 怪物类型1:普通怪物2:BOSS </summary>
  14. public int Type { get; private set; } // c
  15. /// <summary> 名称 </summary>
  16. public string Name { get; private set; } // c
  17. /// <summary> 头像 </summary>
  18. public string Heat { get; private set; } // c
  19. /// <summary> 怪物属性 </summary>
  20. public int Attr { get; private set; } // sc
  21. /// <summary> 怪物技能 </summary>
  22. public int[] Skills { get; private set; } // sc
  23. /// <summary> 模型 </summary>
  24. public string Model { get; private set; } // c
  25. /// <summary> 模型大小 </summary>
  26. public float ModelSize { get; private set; } // c
  27. /// <summary> 攻击力 </summary>
  28. public int Atk { get; private set; }
  29. /// <summary> 攻击范围 </summary>
  30. public float AtkRange { get; private set; }
  31. /// <summary> 血量 </summary>
  32. public int Hp { get; private set; }
  33. /// <summary> 移动速度 </summary>
  34. public float Speed { get; private set; }
  35. void ISerializable.Deserialize(IReader reader)
  36. {
  37. Id = reader.ReadInt();
  38. Type = reader.ReadInt();
  39. Name = reader.ReadString();
  40. Heat = reader.ReadString();
  41. Attr = reader.ReadInt();
  42. Skills = reader.ReadEnumerable<int[]>();
  43. Model = reader.ReadString();
  44. ModelSize = reader.ReadFloat();
  45. Atk = reader.ReadInt();
  46. AtkRange = reader.ReadFloat();
  47. Hp = reader.ReadInt();
  48. Speed = reader.ReadFloat();
  49. }
  50. void ISerializable.Serialize(IWriter writer)
  51. {
  52. writer.Write(Id);
  53. writer.Write(Type);
  54. writer.Write(Name);
  55. writer.Write(Heat);
  56. writer.Write(Attr);
  57. writer.Write(Skills);
  58. writer.Write(Model);
  59. writer.Write(ModelSize);
  60. writer.Write(Atk);
  61. writer.Write(AtkRange);
  62. writer.Write(Hp);
  63. writer.Write(Speed);
  64. }
  65. }
  66. }