Class EndingConditionDistance Extends PathEndingCondition

Public

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.

See

Pathfinding.ConstantPath which uses this ending condition

Public Methods

EndingConditionDistance (p, maxGScore)
Public
TargetFound (node)

Has the ending condition been fulfilled.

Public

Public Variables

maxGScore

Max G score a node may have.

Public

Private/Protected Members

path

Path which this ending condition is used on.

Protected