new texture added and everything resized; worked on spawning and collision checking
This commit is contained in:
@@ -18,11 +18,12 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
||||
ShapeRenderer shapes;
|
||||
|
||||
public CreativeDebugScreen(Polyjet core, MainMenu mainMenu) {
|
||||
creative = new CreativeStage(core, mainMenu);
|
||||
gamePlayArea = new GamePlayArea(core.getAssetManager(), shapes);
|
||||
creative = new CreativeStage(core, mainMenu, gamePlayArea);
|
||||
|
||||
shapes = new ShapeRenderer();
|
||||
shapes.setAutoShapeType(true);
|
||||
|
||||
gamePlayArea = new GamePlayArea(core.getAssetManager(), shapes);
|
||||
inputs = new InputMultiplexer(creative, gamePlayArea);
|
||||
}
|
||||
|
||||
@@ -36,13 +37,10 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
||||
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();
|
||||
|
||||
shapes.begin();
|
||||
gamePlayArea.draw();
|
||||
shapes.end();
|
||||
|
||||
creative.getViewport().apply();
|
||||
creative.act();
|
||||
@@ -54,4 +52,10 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
||||
public void resize(int width, int height) {
|
||||
super.resize(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
shapes.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
@@ -125,10 +125,7 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
|
||||
gameArea.getViewport().apply();
|
||||
|
||||
shapeRenderer.begin();
|
||||
gameArea.draw();
|
||||
shapeRenderer.end();
|
||||
|
||||
|
||||
overlay.getViewport().apply();
|
||||
overlay.draw();
|
||||
|
Reference in New Issue
Block a user