Turabada
A class in Root.Township, Alta.Intelligence.
The turabada creature's AI (Agent<Turabada>). Caches action sets per set asset, so ore variants with their own sets work.
- Listed in Creatures and AI
- Inherits or implements
Agent<Turabada>,IHasViewCone - Derived types
Turabada - Documented in Common creatures, Creature data, Creatures and AI
Constructors
| Member | What it is |
|---|---|
Turabada() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
static Dictionary<ActionComponentSet, ActionSet<Turabada>> passiveActionSetMap | Built action set for each passive set asset. |
static Dictionary<ActionComponent, ActionTarget<Turabada>> stunnedActionMap | Built stunned action for each stunned action component. |
5 private and internal fields
| Member | What it is |
|---|---|
private Transform body | Transform whose position is the turabada's Position. |
private string killedAnimatorBoolean | Animator bool set on the local animator on death. Default "Killed". |
private ActionComponentSet passiveActions | The action set the turabada starts with. |
private ActionComponent stunnedAction | The action component for the stunned action. |
private ViewCone viewCone | Backing field for ViewCone. |
Properties
| Member | What it is |
|---|---|
override Vector3 Position { get; } | The body's position. |
ActionTarget<Turabada> Stunned { get; private set; } | This turabada's stunned action. |
ViewCone ViewCone { get; } | What it can see, read by its view cone sense. |
Methods
| Member | What it is |
|---|---|
void Stun(float strength) | Cancels the current action and starts the stunned one. strength is not used. Called on the server by the prefab's StatTrigger. |
protected override void InitializeAi() | Picks the passive set and stunned action from the shared maps, building them on first use. |
protected override void InitializeStatic() | Creates the empty shared maps, once per class. |
protected override void Killed(HealthObject healthobject) | Turns off collision and sets the animator's killed bool. |