Пример #1
0
 public void onStateUp(GameStateMachine.StateOptions newState)
 {
     currentState = newState;
 }
Пример #2
0
 /// <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>();
 }