Skip to main content

AnimatedInt

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

A synced integer animator parameter. The server sets it and clients write the received value to their animator.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private int maximumHighest value the parameter can sync. Default 1.
private int minimumLowest value the parameter can sync. Default 0.

Methods​

MemberWhat it is
override void Initialize(NetworkAnimator animator, int index)Links to the animator parameter and starts from its current integer value.
protected override void Serialize(Stream stream)Sends the value packed between minimum and maximum. Clients apply it on read.
protected override void Update()Writes the value to the animator's integer parameter.

Used in​

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