Skip to main content

Spriggull

A class in Root.Township, Alta.Intelligence.

The spriggull creature. Runs passive actions, charges its beak while jump attacking, and flails when it takes a strong enough hit.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private FixedImpactor beakThe beak impactor that does damage during a jump attack.
private Transform bodyBacking field for Body; also used as the agent's position.
private ActionComponent flailActionAction component for flailing, used by BeginFlail.
private static ActionTarget<Spriggull> flailingActionShared action target for flailing, built from flailAction once per type.
private Interactor interactorBacking field for Interactor.
private ActionComponentSet passiveActionsAction set the spriggull chooses from, shared by all spriggulls.

Properties​

MemberWhat it is
Transform Body { get; }The body transform. Used as the creature's position.
float IdleStart { get; private set; }Never set in this build, so always 0.
Interactor Interactor { get; }Interactor it grabs things with, such as food it eats.
override Vector3 Position { get; }The body's position.
protected static ActionSet<Spriggull> PassiveActions { get; private set; }Shared action set it normally chooses from.

Methods​

MemberWhat it is
void BeginFlail(float strength)Server: starts the flail action and lowers walking power by the hit strength.
protected override void InitializeAi()Starts on the passive action set.
protected override void InitializeStatic()Builds the shared passive action set and flail action.
protected override void Killed(HealthObject healthobject)Turns off its collision and (server) sets the animator's IsFlailing.
1 private and internal method
MemberWhat it is
private void Alta.Intelligence.IJumpAttacker.SetJumping(bool isJumping)Charges the beak impactor when a jump attack starts and resets it when it ends.

Used in​

Members of other types that take, return or hold a Spriggull: