Exemplo n.º 1
0
 private void SwitchToState(WilesBossState newState)
 {
     if (newState != null)
     {
         if (currentState != null)
         {
             currentState.OnEnd(this);
         }
         currentState = newState;
         currentState.OnStart(this);
     }
 }