diff --git a/android/release/android-release.apk b/android/release/android-release.apk deleted file mode 100644 index a4fef7e..0000000 Binary files a/android/release/android-release.apk and /dev/null differ diff --git a/core/src/controller/Controller.java b/core/src/controller/Controller.java index b9c6bc5..3c89552 100644 --- a/core/src/controller/Controller.java +++ b/core/src/controller/Controller.java @@ -59,7 +59,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ ls = null; gs = null; ws = null; - levelAmount = 10; + levelAmount = 9; currentLevel = -1; batch = new SpriteBatch(); Gdx.input.setInputProcessor(this); @@ -96,7 +96,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ gs.dispose(); stepTimer.stop(); gs = null; - ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, false); + ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, false, currentLevel); } else{ level[currentLevel].step(); @@ -153,8 +153,9 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ if(gs.getWin()){ gs.dispose(); stepTimer.stop(); + level[currentLevel].reset(); gs = null; - ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, true); + ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, true, currentLevel); } } else if(ws != null) ws.render(batch); @@ -212,17 +213,20 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ else if(ws != null){ if(x < Gdx.graphics.getWidth() * 0.33){ ls = new Levelscreen(levelAmount, GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT); + ws = null; } else if(x < Gdx.graphics.getWidth() * 0.66){ gs = new Gamescreen(level[currentLevel], GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); stepTimer.start(); + ws = null; } - else{ + else if(currentLevel < levelAmount){ currentLevel++; gs = new Gamescreen(level[currentLevel], GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); stepTimer.start(); + ws = null; } - ws = null; + } return true; } diff --git a/core/src/view/Gamescreen.java b/core/src/view/Gamescreen.java index fc74896..065b550 100644 --- a/core/src/view/Gamescreen.java +++ b/core/src/view/Gamescreen.java @@ -116,7 +116,7 @@ public class Gamescreen{ shapeRenderer.circle((float) p.getxPos(), (float) p.getyPos(), p.getRadius()); shapeRenderer.setColor(Color.RED); - +/* //goal hitboxes for(int i = 0; i < goalRects.length; i++){ shapeRenderer.rect(goalRects[i].getX(), goalRects[i].getY(), goalRects[i].getWidth(), goalRects[i].getHeight()); diff --git a/core/src/view/Winscreen.java b/core/src/view/Winscreen.java index 1e40ae1..77da3ea 100644 --- a/core/src/view/Winscreen.java +++ b/core/src/view/Winscreen.java @@ -32,12 +32,15 @@ public class Winscreen{ float GAME_WORLD_HEIGHT; boolean win; + + int lvl; - public Winscreen(float width, float height, boolean win){ + public Winscreen(float width, float height, boolean win, int lvl){ t = new Timer(); GAME_WORLD_WIDTH = width; GAME_WORLD_HEIGHT = height; this.win = win; + this.lvl = lvl; if(win){ movement = true; @@ -77,7 +80,7 @@ public class Winscreen{ } public void render(SpriteBatch batch) { - next.draw(batch); + if(lvl < 9)next.draw(batch); level.draw(batch); reset.draw(batch); if(win)winSprite.draw(batch);