Beispiel #1
0
 public void ChangeState(int i)
 {
     currentState = i;
     if (currentstate != null)
     {
         if (currentstate == states[i])
         {
             return;
         }
         currentstate.ExitState();
     }
     currentstate = states[i];
     currentstate.EnterState();
 }