public void setState(int state) { unloadState(currentState); currentState = state; loadState(currentState); // gameStates[currentState].init(); }
public GameStateManager() { gameStates = new GameState[NUMGAMESTATES]; currentState = MENUSTATE; loadState(currentState); }