public final void changeState(EStates id) { this.stateTick = 0; this.mouseDownTick = -1; this.clearMouseStatus(); if (this.activeState == null) { this.activeState = this.gameStates[(id.getValue())]; this.activeState.activateState(); this.changingState = false; } else { this.changingState = true; this.nextState = id; } }
public final void loadAllStates() { for (int i = 1; i < 10; i++) { this.gameStates[i] = this.initState(EStates.forValue(i)); } }
public final GameState getGameState(EStates id) { return this.gameStates[id.getValue()]; }