Skip to main content

AnimatedFloatAiHook

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​

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

Fields​

5 private and internal fields
MemberWhat it is
private Dictionary<IAgent, AnimatedFloat> booleansThe networked float per creature, kept until the action ends (named booleans in the code).
private float endValueValue set when the action ends. Default 2.
private string floatNameAnimator parameter name.
private bool isFloatLerpWhether to use the lerping networked float, which blends to new values.
private float startValueValue set when the action starts. Default 1.

Methods​

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