@Override public void resize(int width, int height) { DynamicFrameBuffer.resetAllBuffers(width, height); menuStage.setViewport(width, height, false); lostStage.setViewport(width, height, false); finishStage.setViewport(width, height, false); pauseStage.setViewport(width, height, false); // aspectRatio = (float) width / (float) height; // resetCamera(); }
@Override public void draw(float delta) { StateMachine.instance().getState(GlobalState.class).getEvents().tick(delta); effects.update(delta); Gdx.gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_BLEND); Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); AbstractStage current = StateMachine.instance().getCurrentState().getStage(); if (current != null) { Gdx.input.setInputProcessor(current); current.draw(); } SoundButton.draw(); if (recorder != null) { recorder.record(30); } }