|
SmartEngine
1.6.0
|
Generic version of the A* algorithm that allows you to specify your own custom graph structure along with actions to be taken. More...
Public Member Functions | |
| int | GetPathDepth () |
| Returns the depth (g-score) of the best destination. This is equal to the path length if the cost to move is always 1 More... | |
| AStarPath< DataType, ActionType > | GetBestPath () |
| Get the path associated with the best destination cell. You must call FindPathToGoal() before this is valid. More... | |
| void | FindPathToGoal (PathingParametersType args) |
| Synchronously search for the best path to take. Call GetBestPath() to return the path after this completes More... | |
| IEnumerator | FindPathToGoalAsync (PathingParametersType args) |
| Asynchronously search for the best path to take. Call GetBestPath() to return the path after this completes More... | |
| virtual void | Reset () |
| Resets the state for a new search. Automatically called at the start of a search. More... | |
Properties | |
| int | MaxSearchDepth [get, set] |
| How far to search before giving up. A value of 0 (default) means search until we've found a solution or exhausted all nodes. This value is compared against the g-score, so neighbors that have higher movement cost will have higher impact on the search depth More... | |
| int | MaxPathLength [get, set] |
| The maximum length path to return. This does not affect how deep we explore before finding a path. It simply truncates the path returned. A value of 0 (default) means don't truncate. More... | |
| float | GScoreMultiplier [get, set] |
| Global multiplier on the g-score. Defaults to 1.0. Setting this to a value lower than one means we value the path we've taken so far less than how long we think it'll take to reach the goal. More... | |
| bool? | BestPathReachedGoal [get] |
| Returns true if we've reached the goal More... | |
Generic version of the A* algorithm that allows you to specify your own custom graph structure along with actions to be taken.
| DataType | |
| ActionType | |
| PathingParametersType |
| void SmartEngine.Pathing.AStar< DataType, ActionType, PathingParametersType >.FindPathToGoal | ( | PathingParametersType | args | ) |
Synchronously search for the best path to take. Call GetBestPath() to return the path after this completes
| args |
| IEnumerator SmartEngine.Pathing.AStar< DataType, ActionType, PathingParametersType >.FindPathToGoalAsync | ( | PathingParametersType | args | ) |
Asynchronously search for the best path to take. Call GetBestPath() to return the path after this completes
| args |
| AStarPath<DataType, ActionType> SmartEngine.Pathing.AStar< DataType, ActionType, PathingParametersType >.GetBestPath | ( | ) |
Get the path associated with the best destination cell. You must call FindPathToGoal() before this is valid.
| int SmartEngine.Pathing.AStar< DataType, ActionType, PathingParametersType >.GetPathDepth | ( | ) |
Returns the depth (g-score) of the best destination. This is equal to the path length if the cost to move is always 1
|
virtual |
Resets the state for a new search. Automatically called at the start of a search.
|
get |
Returns true if we've reached the goal
|
getset |
Global multiplier on the g-score. Defaults to 1.0. Setting this to a value lower than one means we value the path we've taken so far less than how long we think it'll take to reach the goal.
|
getset |
The maximum length path to return. This does not affect how deep we explore before finding a path. It simply truncates the path returned. A value of 0 (default) means don't truncate.
|
getset |
How far to search before giving up. A value of 0 (default) means search until we've found a solution or exhausted all nodes. This value is compared against the g-score, so neighbors that have higher movement cost will have higher impact on the search depth