A class in Root.Township, Alta.Intelligence.
AI hook that sets a networked animator float on the creature when the action starts and another value when it ends.
Constructors
| Member | What it is |
|---|
AnimatedFloatAiHook() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private Dictionary<IAgent, AnimatedFloat> booleans | The networked float per creature, kept until the action ends (named booleans in the code). |
private float endValue | Value set when the action ends. Default 2. |
private string floatName | Animator parameter name. |
private bool isFloatLerp | Whether to use the lerping networked float, which blends to new values. |
private float startValue | Value set when the action starts. Default 1. |
Methods
| Member | What it is |
|---|
protected override void FinishedOrCancelled(IActiveAction finished) | Sets the float to endValue if the creature still exists. |
protected override void Used(IActiveAction active) | Sets the float to startValue, using the lerping float if isFloatLerp is set. |