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
| Member | What it is |
|---|
Spriggull() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private FixedImpactor beak | The beak impactor that does damage during a jump attack. |
private Transform body | Backing field for Body; also used as the agent's position. |
private ActionComponent flailAction | Action component for flailing, used by BeginFlail. |
private static ActionTarget<Spriggull> flailingAction | Shared action target for flailing, built from flailAction once per type. |
private Interactor interactor | Backing field for Interactor. |
private ActionComponentSet passiveActions | Action set the spriggull chooses from, shared by all spriggulls. |
Properties
| Member | What 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
| Member | What 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
| Member | What 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: