A class in Root.Township, Alta.Intelligence.
AI hook that sets a networked animator layer weight on the creature when the action starts and another when it ends.
Constructors
| Member | What it is |
|---|
AnimatedLayerAiHook() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private bool isLerp | Whether the weight blends to new values. Default true. |
private string layerName | Animator layer name. |
private float weightOnEnd | Weight set when the action ends. Default 1. |
private float weightOnStart | Weight set when the action starts. Default 1. |
private Dictionary<IAgent, AnimatedLayerWeight> weights | The networked layer weight per creature, kept until the action ends. |
Methods
| Member | What it is |
|---|
protected override void FinishedOrCancelled(IActiveAction finished) | Sets the layer weight to weightOnEnd. |
protected override void Used(IActiveAction active) | Sets the layer weight to weightOnStart, lerped if isLerp is set. |