Example #1
0
 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;
   }
 }
Example #2
0
 public final void loadAllStates() {
   for (int i = 1; i < 10; i++) {
     this.gameStates[i] = this.initState(EStates.forValue(i));
   }
 }
Example #3
0
 public final GameState getGameState(EStates id) {
   return this.gameStates[id.getValue()];
 }