Unit.cs 357 B

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