Skip to main content

FlagAnimationManager

A class in Root.Township, the global namespace.

Raises or lowers a flag by setting the animator's Active bool from an index. Network entity behaviour, but the state is not synced or saved here.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private bool activeLast state set.
private Animator animatorFlag animator.
private bool[] indexToBoolArrayMaps an input index to up (true) or down (false).
private static Logger loggerNLog logger for this class.
private BoolEvent stateChangedBool event field. Not invoked in this code.

Methods​

MemberWhat it is
override void Initialize()Only calls the base method.
override void InitializeAsServer(SpawnData spawnData)Only calls the base method.
void SetState(int index)Looks up the index in indexToBoolArray and applies it. Logs an error if out of range.
1 private and internal method
MemberWhat it is
private void SetFlagState(bool state)Sets the animator's Active bool.