Gotera
A class in Root.Township, Alta.Intelligence.
Creature class for the gotera and its variants: a body, a view cone, a passive set and an optional stunned action. Server AI; Killed runs on both sides.
- Listed in Creatures and AI
- Inherits or implements
Agent<Gotera>,IHasViewCone - Derived types
Gotera - Documented in Common creatures, Creature data, Creatures and AI
Constructors
| Member | What it is |
|---|---|
Gotera() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private Transform body | Transform whose position is the creature's Position. |
private string killedAnimatorBoolean | Animator bool set on death. Default "Killed". |
private ActionComponentSet passiveActions | The action set the creature starts with. |
private static Dictionary<ActionComponentSet, ActionSet<Gotera>> passiveActionSetMap | Static cache of the action set built from each passive set asset. |
private ActionComponent stunnedAction | The action component for the stunned action. May be empty. |
private static Dictionary<ActionComponent, ActionTarget<Gotera>> stunnedActionMap | Static cache of the stunned action built from each action component. |
private ViewCone viewCone | Backing field for ViewCone. |
Properties
| Member | What it is |
|---|---|
override Vector3 Position { get; } | The body transform's position. |
ActionTarget<Gotera> Stunned { get; private set; } | The stunned action, if the prefab has one. |
ViewCone ViewCone { get; } | The creature's view cone. |
Methods
| Member | What it is |
|---|---|
void Stun(float strength) | Server: starts the stunned action. strength is ignored. Called by a StatTrigger on the variant prefabs. |
protected override void InitializeAi() | Server: picks the passive set and, if the prefab has one, the stunned action, building each once per asset. |
protected override void InitializeStatic() | Creates the shared set and stunned action caches, once per class. |
protected override void Killed(HealthObject healthobject) | Turns off collision and sets the killed animator bool on the local animator. |