Skip to main content

AnimatedBoolAiHook

A class in Root.Township, Alta.Intelligence.

AI hook that sets an animator bool on the creature when the action starts and another value when it ends, either networked or local only.

Constructors​

MemberWhat it is
AnimatedBoolAiHook()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, AnimatedBool> booleansThe networked bool per creature, kept until the action ends.
private string boolNameAnimator parameter name.
private bool isEndTrueValue set when the action ends. Default false.
private bool isNetworkedWhether to set the bool through NetworkAnimator so clients see it, or only on the local animator. Default true.
private bool isStartTrueValue set when the action starts. Default true.

Methods​

MemberWhat it is
protected override void FinishedOrCancelled(IActiveAction finished)Sets the bool to isEndTrue if the creature still exists.
protected override void Used(IActiveAction active)Sets the bool to isStartTrue, through the network animator if networked.