UnitPathComponent.cs 802 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Collections.Generic;
  2. using System.Threading;
  3. using PF;
  4. using UnityEngine;
  5. namespace ET
  6. {
  7. public class UnitPathComponent: Entity
  8. {
  9. public Vector3 Target;
  10. private ABPathWrap abPath;
  11. public List<Vector3> Path;
  12. public ETCancellationToken CancellationToken;
  13. public ABPathWrap ABPath
  14. {
  15. get
  16. {
  17. return this.abPath;
  18. }
  19. set
  20. {
  21. this.abPath?.Dispose();
  22. this.abPath = value;
  23. }
  24. }
  25. public override void Dispose()
  26. {
  27. if (this.IsDisposed)
  28. {
  29. return;
  30. }
  31. base.Dispose();
  32. this.abPath?.Dispose();
  33. }
  34. }
  35. }