Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
PathProgress Class Reference

Public Types

enum  State { Idle , Searching , PathReady , Fail }
 

Public Member Functions

bool IsDestinationReached (Point pos)
 
void RequestPath (Point _startPoint, Point _destPoint, int _destDist, bool _ignoreConnection, int _searchLimit=-1)
 
void RequestPathImmediate (Point _startPoint, Point _destPoint, int _destDist, bool _ignoreConnection, int _searchLimit=-1)
 

Public Attributes

IPathfindWalker walker
 
List< PathFinderNodenodes = new List<PathFinderNode>()
 
Point startPoint = new Point()
 
Point destPoint = new Point()
 
int nodeIndex
 
State state
 
int destDist
 
int searchLimit
 
bool ignoreConnection
 
PathManager.MoveType moveType
 

Properties

bool HasPath [get]
 

Detailed Description

Definition at line 4 of file PathProgress.cs.

Member Enumeration Documentation

◆ State

Enumerator
Idle 
Searching 
PathReady 
Fail 

Definition at line 6 of file PathProgress.cs.

Member Function Documentation

◆ IsDestinationReached()

bool PathProgress.IsDestinationReached ( Point  pos)
inline

Definition at line 46 of file PathProgress.cs.

47 {
48 return Util.Distance(pos.x, pos.z, destPoint.x, destPoint.z) <= destDist;
49 }
Point destPoint
Definition: PathProgress.cs:20
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
Definition: Util.cs:10
static int Distance(int pX1, int pY1, int pX2, int pY2)
Definition: Util.cs:24

References destDist, destPoint, Util, Point.x, and Point.z.

◆ RequestPath()

void PathProgress.RequestPath ( Point  _startPoint,
Point  _destPoint,
int  _destDist,
bool  _ignoreConnection,
int  _searchLimit = -1 
)
inline

Definition at line 51 of file PathProgress.cs.

52 {
53 startPoint.Set(_startPoint);
54 destPoint.Set(_destPoint);
55 destDist = _destDist;
56 ignoreConnection = _ignoreConnection;
57 searchLimit = ((_searchLimit == -1) ? PathManager.Instance.searchLimit : _searchLimit);
59 }
void RequestPath(PathProgress progress)
Definition: PathManager.cs:31
int searchLimit
Definition: PathManager.cs:22
static PathManager Instance
Definition: PathManager.cs:16
Point startPoint
Definition: PathProgress.cs:18
bool ignoreConnection
Definition: PathProgress.cs:30
Point Set(int _x, int _z)
Definition: Point.cs:479

References destDist, destPoint, ignoreConnection, PathManager.Instance, PathManager.RequestPath(), PathManager.searchLimit, searchLimit, Point.Set(), and startPoint.

Referenced by AI_Goto.TryGoTo().

◆ RequestPathImmediate()

void PathProgress.RequestPathImmediate ( Point  _startPoint,
Point  _destPoint,
int  _destDist,
bool  _ignoreConnection,
int  _searchLimit = -1 
)
inline

Definition at line 61 of file PathProgress.cs.

62 {
63 startPoint.Set(_startPoint);
64 destPoint.Set(_destPoint);
65 destDist = _destDist;
66 ignoreConnection = _ignoreConnection;
67 searchLimit = ((_searchLimit == -1) ? PathManager.Instance.searchLimit : _searchLimit);
69 }
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41

References destDist, destPoint, ignoreConnection, PathManager.Instance, PathManager.RequestPathImmediate(), PathManager.searchLimit, searchLimit, Point.Set(), and startPoint.

Referenced by PathManager._GetFirstStep(), PathManager.IsPathClear(), PathManager.RequestPathImmediate(), and AI_Goto.TryGoTo().

Member Data Documentation

◆ destDist

int PathProgress.destDist

Definition at line 26 of file PathProgress.cs.

Referenced by IsDestinationReached(), RequestPath(), and RequestPathImmediate().

◆ destPoint

Point PathProgress.destPoint = new Point()

◆ ignoreConnection

bool PathProgress.ignoreConnection

◆ moveType

PathManager.MoveType PathProgress.moveType

Definition at line 32 of file PathProgress.cs.

Referenced by Algorithms.PathFinder.FindPath().

◆ nodeIndex

int PathProgress.nodeIndex

Definition at line 22 of file PathProgress.cs.

Referenced by AI_Goto.TryGoTo().

◆ nodes

◆ searchLimit

int PathProgress.searchLimit

◆ startPoint

Point PathProgress.startPoint = new Point()

◆ state

State PathProgress.state

Definition at line 24 of file PathProgress.cs.

Referenced by AI_Goto.Run(), and AI_Goto.TryGoTo().

◆ walker

IPathfindWalker PathProgress.walker

Definition at line 14 of file PathProgress.cs.

Property Documentation

◆ HasPath

bool PathProgress.HasPath
get

Definition at line 34 of file PathProgress.cs.

35 {
36 get
37 {
38 if (state == State.PathReady)
39 {
40 return nodes.Count >= 1;
41 }
42 return false;
43 }
44 }

Referenced by PathManager._GetFirstStep(), Spatial.Dist(), Zone_Dungeon.PlaceRail(), Chara.TryMoveTowards(), and GameUpdater.Update().


The documentation for this class was generated from the following file: