Пример #1
0
  @Override
  public void hide() {
    // TODO remove controller listener

    // save zoom
    Preferences.putFloat("gameZoom", gameZoom);
    Preferences.flush();
  }
Пример #2
0
    @Override
    public boolean keyDown(int keycode) {
      if (keycode == Keys.RIGHT) {

      } else if (keycode == Keys.SPACE) {
        player.isShooting = true;
      } else if (keycode == Keys.X || keycode == Keys.MENU) {
        player.switchWeapon();
      } else if (keycode == Keys.PLUS || keycode == Keys.VOLUME_UP) {
        gameZoom -= 0.5f;
        Preferences.putFloat("gameZoom", gameZoom);
        Preferences.flush(); // TODO only flush once, when ingame/options screen is finished?
      } else if (keycode == Keys.MINUS || keycode == Keys.VOLUME_DOWN) {
        gameZoom += 0.5f;
        Preferences.putFloat("gameZoom", gameZoom);
        Preferences.flush(); // TODO only flush once, when ingame/options screen is finished?
      }
      return false;
    }