14 return this.state == PathProgress.State.PathReady && this.nodes.Count >= 1;
19 public bool IsDestinationReached(
Point pos)
21 return Util.Distance(pos.x, pos.z,
this.destPoint.x,
this.destPoint.z) <= this.destDist;
25 public void RequestPath(
Point _startPoint,
Point _destPoint,
int _destDist,
bool _ignoreConnection,
int _searchLimit = -1)
27 if (_startPoint.cell.isSurrounded4d || _destPoint.cell.isSurrounded4d)
34 this.startPoint.Set(_startPoint);
35 this.destPoint.Set(_destPoint);
36 this.destDist = _destDist;
37 this.ignoreConnection = _ignoreConnection;
38 this.searchLimit = ((_searchLimit == -1) ? PathManager.Instance.searchLimit : _searchLimit);
43 public void RequestPathImmediate(
Point _startPoint,
Point _destPoint,
int _destDist,
bool _ignoreConnection,
int _searchLimit = -1)
45 if (_startPoint.cell.isSurrounded4d || _destPoint.cell.isSurrounded4d)
52 this.startPoint.Set(_startPoint);
53 this.destPoint.Set(_destPoint);
54 this.destDist = _destDist;
55 this.ignoreConnection = _ignoreConnection;
56 this.searchLimit = ((_searchLimit == -1) ? PathManager.Instance.searchLimit : _searchLimit);
64 public List<PathFinderNode> nodes =
new List<PathFinderNode>();
76 public PathProgress.State state;
82 public int searchLimit;
85 public bool ignoreConnection;
88 public PathManager.MoveType moveType;