A class in Root.Township, Alta.Intelligence.
Settings for ActiveThreaten: face the target for a random time, switching to another action set if it comes close and cancelling if it goes far. Server only.
Constructors
| Member | What it is |
|---|
AgentThreatenSettings() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private float cancelDistance | Backing field for CancelDistance (default 10). |
private ActionComponentSet changeTo | Backing field for ChangeTo. |
private float instantDistance | Backing field for InstantDistance (default 0). |
private bool isFacing | Backing field for IsFacing (default true). |
Properties
| Member | What it is |
|---|
float CancelDistance { get; } | The action cancels when the target is further than this. |
ActionComponentSet ChangeTo { get; } | Action set the creature switches to when the action finishes, whether by timeout or the target coming within InstantDistance. |
float InstantDistance { get; } | The action finishes at once when the target comes closer than this. |
bool IsFacing { get; } | Whether the creature turns to face the target while threatening. |
Methods
| Member | What it is |
|---|
protected override IAction GetAction() | Builds the shared ActiveThreaten action, which uses a target. |