new texture added and everything resized; worked on spawning and collision checking

This commit is contained in:
2017-05-31 13:49:18 -05:00
parent 5776586458
commit 70bf120a5f
67 changed files with 73 additions and 33 deletions

View File

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

View File

@@ -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();