UnitPathComponent.cs 801 B

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