diff --git a/core/src/com/dungeoncrawler/control/Controller.java b/core/src/com/dungeoncrawler/control/Controller.java index 4e4434a..1d5f118 100644 --- a/core/src/com/dungeoncrawler/control/Controller.java +++ b/core/src/com/dungeoncrawler/control/Controller.java @@ -431,8 +431,6 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ d.getPlayer().deleteKey(); - d.getPlayer().setMovementY(0f); - d.getPlayer().setMovementX(0f); gs.startLoadingScreen(); level++; @@ -463,7 +461,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ ArrayList tempSprites = gs.getM().getMaps()[level][roomPosX][roomPosY].getMapItems(); ArrayList garbageCollector = new ArrayList<>(); - for(int i = 0; i < tempItems.size(); i++){ + for(int i = tempItems.size() - 1; i >= 0; i--){ if(Intersector.overlaps(gs.getPlayer().getCollisionSprite(), tempSprites.get(i).getSprite().getBoundingRectangle())){ garbageCollector.add(tempItems.get(i)); diff --git a/desktop/src/com/dungeoncrawler/desktop/DesktopLauncher.java b/desktop/src/com/dungeoncrawler/desktop/DesktopLauncher.java index 581ac5d..a4ee41e 100644 --- a/desktop/src/com/dungeoncrawler/desktop/DesktopLauncher.java +++ b/desktop/src/com/dungeoncrawler/desktop/DesktopLauncher.java @@ -6,15 +6,15 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.dungeoncrawler.control.Controller; public class DesktopLauncher { - public static void main (String[] arg) { - LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); - - config.width = 1600; - config.height = 900; - config.title = "The Restless Caverns - Der beste Dungeon Crawler ALLER ZEITEN"; - config.resizable = true; + public static void main (String[] arg) { + LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); - //config.addIcon("logo.png", Files.FileType.Internale); - new LwjglApplication(new Controller(), config); - } + config.width = 1600; + config.height = 900; + config.title = "The Restless Caverns - Der beste Dungeon Crawler ALLER ZEITEN"; + config.resizable = true; + + //config.addIcon("logo.png", Files.FileType.Internale); + new LwjglApplication(new Controller(), config); + } }