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
| Member | What it is |
|---|
FlagAnimationManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private bool active | Last state set. |
private Animator animator | Flag animator. |
private bool[] indexToBoolArray | Maps an input index to up (true) or down (false). |
private static Logger logger | NLog logger for this class. |
private BoolEvent stateChanged | Bool event field. Not invoked in this code. |
Methods
| Member | What 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
| Member | What it is |
|---|
private void SetFlagState(bool state) | Sets the animator's Active bool. |