|
A* Pathfinding Project
3.1.4
The A* Pathfinding Project for Unity 3D
|
Target is found when the path is longer than a specified value. More...
Inheritance diagram for EndingConditionDistance:
Collaboration diagram for EndingConditionDistance:Public Member Functions | |
| EndingConditionDistance (Path p, int maxGScore) | |
| override bool | TargetFound (NodeRun node) |
| Has the ending condition been fulfilled. | |
Public Member Functions inherited from PathEndingCondition | |
| PathEndingCondition (Path p) | |
Public Attributes | |
| int | maxGScore = 100 |
| Max G score a node may have. | |
Additional Inherited Members | |
Protected Attributes inherited from PathEndingCondition | |
| Path | p |
Target is found when the path is longer than a specified value.
Actually this is defined as when the current node's G score is >= a specified amount (EndingConditionDistance::maxGScore).
The G score is the cost from the start node to the current node, so an area with a higher penalty (weight) will add more to the G score. However the G score is usually just the shortest distance from the start to the current node.
|
virtual |
Has the ending condition been fulfilled.
| node | The current node. This is per default the same as asking if node == p.endNode |
Reimplemented from PathEndingCondition.