Skip to main content

MediumBird

A class in Root.Township, the global namespace.

Test driver for a bird's animator: pushes inspector values into the animator each frame and can move the bird forward.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private float aggressionValue for the Aggression parameter.
private bool isMovingWhether the bird moves forward each frame.
private float passiveActionValue for the Idle Behaviour parameter.
private float passiveWeightWeight of animator layer 1.
private float speedValue for the Speed parameter.
private float speedMovementForward speed when moving.

Properties​

MemberWhat it is
NetworkAnimator Animator { get; private set; }The NetworkAnimator found in the children.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Finds the network animator.
private void Update()Sets the Speed, Idle Behaviour and Aggression parameters and layer 1 weight, and moves forward if isMoving.