Skip to main content

AnimatedFloat

A class in Root.Township, Alta.Networking.Animation.

A synced float parameter on a NetworkAnimator, sent compressed within a range and precision.

Constructors​

MemberWhat it is
AnimatedFloat(string name)Creates an AnimatedFloat from name.

Fields​

MemberWhat it is
protected float maximumHighest value sent.
protected float minimumLowest value sent.
protected float precisionStep size used to compress the value.

Properties​

MemberWhat it is
override int ChangedCounter { get; }How many syncs a change is sent for: 2 here (the base default is 10).

Methods​

MemberWhat it is
override void Initialize(NetworkAnimator animator, int index)Binds to the animator and reads the parameter's current value.
protected override void Serialize(Stream stream)Writes or reads the value within the range; clients apply it.
protected override void Update()Pushes the value to the Unity animator.

Used in​

Members of other types that take, return or hold a AnimatedFloat: