successfully added debug spawning system and finished void circle enemy
This commit is contained in:
@@ -4,7 +4,6 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.InputMultiplexer;
|
||||
import com.badlogic.gdx.ScreenAdapter;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
||||
|
||||
import zero1hd.polyjet.Polyjet;
|
||||
import zero1hd.polyjet.ui.stages.CreativeStage;
|
||||
@@ -15,15 +14,10 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
||||
GamePlayArea gamePlayArea;
|
||||
InputMultiplexer inputs;
|
||||
|
||||
ShapeRenderer shapes;
|
||||
|
||||
public CreativeDebugScreen(Polyjet core, MainMenu mainMenu) {
|
||||
gamePlayArea = new GamePlayArea(core.getAssetManager(), shapes);
|
||||
gamePlayArea = new GamePlayArea(core.getAssetManager());
|
||||
creative = new CreativeStage(core, mainMenu, gamePlayArea);
|
||||
|
||||
shapes = new ShapeRenderer();
|
||||
shapes.setAutoShapeType(true);
|
||||
|
||||
inputs = new InputMultiplexer(creative, gamePlayArea);
|
||||
}
|
||||
|
||||
@@ -37,7 +31,8 @@ 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);
|
||||
|
||||
Gdx.gl.glLineWidth(1f);
|
||||
|
||||
gamePlayArea.getViewport().apply();
|
||||
gamePlayArea.act();
|
||||
gamePlayArea.draw();
|
||||
@@ -55,7 +50,6 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
shapes.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@ import com.badlogic.gdx.InputProcessor;
|
||||
import com.badlogic.gdx.ScreenAdapter;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||
@@ -38,11 +37,8 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
|
||||
|
||||
private AudioData music;
|
||||
|
||||
private ShapeRenderer shapeRenderer;
|
||||
|
||||
public GameScreen(Polyjet polyJet) {
|
||||
core = polyJet;
|
||||
shapeRenderer = new ShapeRenderer();
|
||||
|
||||
// Overlay stuff
|
||||
overlay = new Stage();
|
||||
@@ -101,7 +97,7 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
|
||||
(Gdx.graphics.getHeight() - pauseMenu.getHeight()) / 2);
|
||||
|
||||
// Continue to add things to input multiplexer
|
||||
gameArea = new GamePlayArea(polyJet.getAssetManager(), shapeRenderer);
|
||||
gameArea = new GamePlayArea(polyJet.getAssetManager());
|
||||
|
||||
inputs = new InputMultiplexer();
|
||||
inputs.addProcessor(this);
|
||||
@@ -123,6 +119,7 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
|
||||
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);
|
||||
Gdx.gl.glLineWidth(1f);
|
||||
gameArea.getViewport().apply();
|
||||
|
||||
gameArea.draw();
|
||||
|
Reference in New Issue
Block a user