@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); }
public void update() { camera.update(); gameHud.update(camera); if (Gdx.input.isKeyJustPressed(Keys.I)) { System.out.println("Saving"); WorldIO.saveWorld(world); } world.update(camera); }
@Override public void dispose() { gameHud.dispose(); Timer.stopGameTime(); }
@Override public void resize(int width, int height) { camera.resize(); gameHud.resize(width, height); }
@Override public void resume() { gameHud.resume(); Timer.startGameTime(); }