Follower
A class in Root.Township, Alta.Pathfinding.
Makes a Navigator keep re-pathing to a moving target on an interval. Made by Director.
- Listed in Creatures and AI
Constructors
| Member | What it is |
|---|---|
Follower(Navigator navigator) | Creates a Follower from navigator. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private float minimumInterval | Shortest time between path requests (interval minus 0.1 seconds). |
private Navigator navigator | The navigator being driven. |
private Coroutine reevaluationCoroutine | The running re-path coroutine, if any. |
private WaitForSeconds reevaluationInterval | Wait between re-paths (default 0.5 seconds). |
private ITarget target | The target being followed. |
private float targetReachedDistance | Distance at which the target counts as reached (default 0.1). |
Methods
| Member | What it is |
|---|---|
void Follow(ITarget newTarget, float reevaluationInterval = 0.5, float targetReachedDistance = 0.1) | Starts following a target (or updates the interval and reach distance); null stops following. |
void StopFollow() | Clears the target and stops the re-path loop. |
3 private and internal methods
Used in
Members of other types that take, return or hold a Follower: