Unit.cs 636 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using UnityEngine;
  2. namespace ETModel
  3. {
  4. public enum UnitType
  5. {
  6. Hero,
  7. Npc
  8. }
  9. public sealed class Unit: Entity
  10. {
  11. public VInt3 IntPos;
  12. public GameObject GameObject;
  13. public void Awake()
  14. {
  15. }
  16. public Vector3 Position
  17. {
  18. get
  19. {
  20. return GameObject.transform.position;
  21. }
  22. set
  23. {
  24. GameObject.transform.position = value;
  25. }
  26. }
  27. public Quaternion Rotation
  28. {
  29. get
  30. {
  31. return GameObject.transform.rotation;
  32. }
  33. set
  34. {
  35. GameObject.transform.rotation = value;
  36. }
  37. }
  38. public override void Dispose()
  39. {
  40. if (this.IsDisposed)
  41. {
  42. return;
  43. }
  44. base.Dispose();
  45. }
  46. }
  47. }