public static void Update( double dt )
 {
     if ( switchTo != null ) {
         if (currentState != null ) {
             currentState.TearDown();
         }
         currentState = switchTo;
         currentState.SetUp();
         switchTo = null;
     }
     currentState.Update( dt );
 }
 public static void Switch( State state )
 {
     switchTo = state;
 }