Unit.cs 429 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Numerics;
  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 Gamer Gamer;
  13. public Vector3 Position;
  14. public override void Dispose()
  15. {
  16. if (this.Id == 0)
  17. {
  18. return;
  19. }
  20. base.Dispose();
  21. }
  22. public Unit(Gamer gamer, UnitType unitType)
  23. {
  24. this.Gamer = gamer;
  25. this.UnitType = unitType;
  26. }
  27. }
  28. }