ActiveIdle
A class in Root.Township, Alta.Intelligence.
The running idle action for an agent, made from AgentIdleSettings. It waits a random duration and can turn to face or follow the target while it does.
- Listed in Creatures and AI
- Inherits or implements
BasicActiveAction<Agent, AgentIdleSettings>
Constructors
| Member | What it is |
|---|---|
ActiveIdle() | Creates an ActiveIdle with default values. |
Fields
2 private and internal fields
Methods
| Member | What it is |
|---|---|
static BasicAction<Agent, ActiveIdle, AgentIdleSettings> GetAction(AgentIdleSettings settings) | Builds the idle action for the given settings, copying their IsUsingTarget flag. |
override void Update(bool hasTarget) | While the target exists, faces it and follows it inside the configured time windows; otherwise stops the director. |
protected override void OnStart() | Maybe asks the population to move the spawn, sets a random duration, records the start time and hooks the finish handlers when facing the target. |
1 private and internal method
| Member | What it is |
|---|---|
private void OnFinished(IActiveAction finished) | Restores the walker's slow-down flag and stops the director's facing and movement when the idle ends or is cancelled. |
Used in
Members of other types that take, return or hold a ActiveIdle: