public void ChangeState(IEntityState newState)
 {
     if (currentState != null && currentState.WillStop())
     {
         currentState.Stop();
     }
     currentState = newState;
     currentState.Enter();
 }
Exemple #2
0
 public virtual void ChangeState(IEntityState <EntityState> newState)
 {
     CurrentState.Exit();
     CurrentState = newState;
     CurrentState.Enter();
 }