A class in Root.Township, Alta.Intelligence.Wyrms.
Wyrm action that burrows back underground after it has been idle a while. Runs on the server as part of the wyrm AI.
Constructors
| Member | What it is |
|---|
ActiveDig() | Creates an ActiveDig with default values. |
Fields
1 private and internal field
| Member | What it is |
|---|
private const float Duration | Unused constant of 2.5 seconds; the real duration comes from the settings. |
Methods
| Member | What it is |
|---|
static BasicAction<Wyrm, ActiveDig, WyrmDigSettings> GetAction(WyrmDigSettings settings) | Builds the dig action. Its score grows with idle time over MaxStrengthDuration, with a FailChance of scoring 0. |
override void Update(bool hasTarget) | Does nothing each tick. |
protected override void OnStart() | Switches to burrowed actions, sets the Burrowed animator bool and schedules the sense change after ChangeSenseDelay. |
2 private and internal methods
| Member | What it is |
|---|
private void ChangeSenses() | Zeroes the wyrm's senses and applies the settings' DugSenses. |
private void DigFinished(IActiveAction finished) | When the dig ends, hides the wyrm's GameObjects and turns off its collision. |