Skip to main content

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.

Constructors​

MemberWhat it is
Turabada()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
static Dictionary<ActionComponentSet, ActionSet<Turabada>> passiveActionSetMapBuilt action set for each passive set asset.
static Dictionary<ActionComponent, ActionTarget<Turabada>> stunnedActionMapBuilt stunned action for each stunned action component.
5 private and internal fields
MemberWhat it is
private Transform bodyTransform whose position is the turabada's Position.
private string killedAnimatorBooleanAnimator bool set on the local animator on death. Default "Killed".
private ActionComponentSet passiveActionsThe action set the turabada starts with.
private ActionComponent stunnedActionThe action component for the stunned action.
private ViewCone viewConeBacking field for ViewCone.

Properties​

MemberWhat 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​

MemberWhat 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.