Beispiel #1
0
  @Override
  public void render(SpriteBatch sb) {
    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    gameHud.renderBackground();

    sb.setProjectionMatrix(camera.combined);
    sb.begin();
    world.render(sb, camera);
    sb.end();

    gameHud.render(camera);
  }
Beispiel #2
0
  public void update() {
    camera.update();
    gameHud.update(camera);

    if (Gdx.input.isKeyJustPressed(Keys.I)) {
      System.out.println("Saving");
      WorldIO.saveWorld(world);
    }

    world.update(camera);
  }
Beispiel #3
0
 @Override
 public void dispose() {
   gameHud.dispose();
   Timer.stopGameTime();
 }
Beispiel #4
0
 @Override
 public void resize(int width, int height) {
   camera.resize();
   gameHud.resize(width, height);
 }
Beispiel #5
0
 @Override
 public void resume() {
   gameHud.resume();
   Timer.startGameTime();
 }