Skip to main content

AnimatedBool

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

A synced bool parameter on a NetworkAnimator. Setting it updates the Unity animator and marks it to be sent to clients for the next few syncs.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for this class.

Properties​

MemberWhat it is
override bool Value { get; set; }The bool. Setting a new value updates the animator and flags it as changed.

Methods​

MemberWhat it is
override void Initialize(NetworkAnimator animator, int index)Binds to the animator and reads the parameter's current value.
override void Serialize(Stream stream, bool isSendingAll)Writes or reads the value; clients apply what they receive. Counts down the changed flag on partial sends.
void UpdateChanged(bool isSendingAll)Counts down the changed flag without writing.
protected override void Serialize(Stream stream)Writes or reads the value; clients apply what they receive. Counts down the changed flag on partial sends.
protected override void Update()Pushes the value to the Unity animator.

Used in​

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