public void onStateUp(GameStateMachine.StateOptions newState) { currentState = newState; }
/// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> void Start() { GameStateMachine.current.onStatePushed += onStateUp; currentState = GameStateMachine.current.GetState(); animatorionar = GetComponent <Animator>(); }