Ejemplo n.º 1
0
 @Override
 public void init(GameContainer container, StateBasedGame game) throws SlickException {
   currentState = State.NOT_USED;
   model = PyromaniacModel.getInstance();
   inputManager = InputManager.getInstance();
   view = new GameOverView();
 }
Ejemplo n.º 2
0
  @Override
  public void update(GameContainer container, StateBasedGame game, int delta)
      throws SlickException {

    Input input = container.getInput();
    boolean pressedProcced = inputManager.pressedProceed(input);

    if (pressedProcced) {
      int newState = PyromaniacsGame.MAIN_MENU_STATE;
      ControllerUtils.changeState(game, newState);
    }
  }
Ejemplo n.º 3
0
  /** A private util method for reseting the model */
  private void resetGame() {

    inputManager.removeAllInputHandlers();

    model.gameReset();
  }