Unit.cs 319 B

12345678910111213141516171819202122232425262728
  1. namespace Hotfix
  2. {
  3. public enum UnitType
  4. {
  5. Hero,
  6. Npc
  7. }
  8. public sealed class Unit: Entity
  9. {
  10. public UnitType UnitType { get; }
  11. public override void Dispose()
  12. {
  13. if (this.Id == 0)
  14. {
  15. return;
  16. }
  17. base.Dispose();
  18. }
  19. public Unit(UnitType unitType)
  20. {
  21. this.UnitType = unitType;
  22. }
  23. }
  24. }