diff --git a/core/src/controller/Controller.java b/core/src/controller/Controller.java index 9c444e7..9a56b79 100644 --- a/core/src/controller/Controller.java +++ b/core/src/controller/Controller.java @@ -152,7 +152,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ else{ ls.dispose(); ls = null; - gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT); + gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera); stepTimer.start(); } } @@ -166,10 +166,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ ls = new Levelscreen(levelAmount, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT); } else if(x < Gdx.graphics.getWidth() * 0.66){ - gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT); + gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera); } else{ - gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT); + gs = new Gamescreen(level, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera); } ws = null; } diff --git a/core/src/view/Gamescreen.java b/core/src/view/Gamescreen.java index f7895c3..abf5f2f 100644 --- a/core/src/view/Gamescreen.java +++ b/core/src/view/Gamescreen.java @@ -35,7 +35,7 @@ public class Gamescreen{ float GAME_WORLD_WIDTH; float GAME_WORLD_HEIGHT; - public Gamescreen(Level level, float width, float height){ + public Gamescreen(Level level, float width, float height, OrthographicCamera camera){ GAME_WORLD_WIDTH = width; GAME_WORLD_HEIGHT = height; pivotX = level.getPivotX(); @@ -48,7 +48,7 @@ public class Gamescreen{ //goalRight = new Rectangle(g.getxPos() + 0.1f * g.getSizeX() + 0.8f * g.getSizeX(), g.getyPos(), 0.1f * g.getSizeX(),g.getSizeY()); shapeRenderer = new ShapeRenderer(); - + shapeRenderer.setProjectionMatrix(camera.combined); }