viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true);
}
public void draw () {
Camera camera = viewport.getCamera();
camera.update();
if (!root.isVisible()) return;
batch.setProjectionMatrix(camera.combined);
batch.begin();
root.draw(batch, 1);
batch.end();