A class in Root.Township, the global namespace.
Animator state behaviour that sets a float parameter (usually a blend tree value) to a random value when the state is entered, optionally through the NetworkAnimator.
Constructors
| Member | What it is |
|---|
RandomTreeValue() | Creates a RandomTreeValue with default values. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private bool isBinary | Pick only minimum or maximum, half the time each. |
private bool isNetworked | Set the value through the NetworkAnimator so the server's value syncs to clients. |
private bool isNetworkLerped | When networked, write to the lerped network float instead of the plain one. |
private float maximum | Upper bound. |
private float minimum | Lower bound. |
private string valueName | Float parameter to set, Blend by default. |
Methods
| Member | What it is |
|---|
override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) | Sets the float on the Animator, or when networked sets it on the NetworkAnimator from the server only. |
1 private and internal method
| Member | What it is |
|---|
private float GetValue() | Random value between the bounds, or one of the two bounds if binary. |