rhythmbullet/core/src/zero1hd/polyjet/screens/CreativeDebugScreen.java

51 lines
1.3 KiB
Java
Executable File

package zero1hd.polyjet.screens;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.ScreenAdapter;
import com.badlogic.gdx.graphics.GL20;
import zero1hd.polyjet.Polyjet;
import zero1hd.polyjet.ui.stages.CreativeStage;
import zero1hd.polyjet.ui.stages.GamePlayArea;
public class CreativeDebugScreen extends ScreenAdapter {
CreativeStage creative;
GamePlayArea gamePlayArea;
InputMultiplexer inputs;
public CreativeDebugScreen(Polyjet core, MainMenu mainMenu) {
creative = new CreativeStage(core, mainMenu);
gamePlayArea = new GamePlayArea(core);
inputs = new InputMultiplexer(creative, gamePlayArea);
}
@Override
public void show() {
Gdx.input.setInputProcessor(inputs);
super.show();
}
@Override
public void render(float delta) {
Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
gamePlayArea.getViewport().apply();
gamePlayArea.act();
gamePlayArea.draw();
creative.getViewport().apply();
creative.act();
creative.draw();
super.render(delta);
}
@Override
public void resize(int width, int height) {
// TODO Auto-generated method stub
super.resize(width, height);
}
}