public void goToPauseState() { States.State temp = currentState; currentState = new States.PauseMenu(this, Keyboard.GetState(), GamePad.GetState(PlayerIndex.One), "", temp); currentState.Initialize(); currentState.LoadContent(); }
public void goToNextState(States.State state) { for (int i = this.Components.Count - 1; i >= 0; i--) { if (this.Components[i] is GameComponent) { GameComponent temp = (GameComponent)this.Components[i]; temp.Dispose(); } } currentState = state; currentState.Initialize(); currentState.LoadContent(); }