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
| Member | What it is |
|---|
AnimatedBoolAiHook() | 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, AnimatedBool> booleans | The networked bool per creature, kept until the action ends. |
private string boolName | Animator parameter name. |
private bool isEndTrue | Value set when the action ends. Default false. |
private bool isNetworked | Whether to set the bool through NetworkAnimator so clients see it, or only on the local animator. Default true. |
private bool isStartTrue | Value set when the action starts. Default true. |
Methods
| Member | What 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. |