Пример #1
0
 public void SetState(AbstractState state)
 {
     if (currentState != null) {
         currentState.Finish ();
     }
     currentState = state;
     currentState.Init (this);
     currentState.Start ();
     //propably we need run update in creating frame
     currentState.Update();
 }
Пример #2
0
 public void ChangeState(AbstractState newState)
 {
     machine.SetState (newState);
 }