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 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); }