diff --git a/SMIMS-Game/MyWorld.class b/SMIMS-Game/MyWorld.class index 11455a4..a4bd822 100644 Binary files a/SMIMS-Game/MyWorld.class and b/SMIMS-Game/MyWorld.class differ diff --git a/SMIMS-Game/MyWorld.java b/SMIMS-Game/MyWorld.java index 4e70578..2fe3fc1 100644 --- a/SMIMS-Game/MyWorld.java +++ b/SMIMS-Game/MyWorld.java @@ -57,8 +57,8 @@ public class MyWorld extends World plattform2.setLocation(320,367); plattform2.setLocation(312,371); plattform2.setLocation(308,382); - Healthbar healthbar = new Healthbar(); - addObject(healthbar,50,50); + //Healthbar healthbar = new Healthbar(); + //addObject(healthbar,50,50); Heart heart = new Heart(); addObject(heart,371,27); Heart heart2 = new Heart(); diff --git a/SMIMS-Game/Player.class b/SMIMS-Game/Player.class index 38bfcc6..1f9d2f1 100644 Binary files a/SMIMS-Game/Player.class and b/SMIMS-Game/Player.class differ diff --git a/SMIMS-Game/Player.java b/SMIMS-Game/Player.java index d99b9e5..64455ac 100644 --- a/SMIMS-Game/Player.java +++ b/SMIMS-Game/Player.java @@ -121,7 +121,9 @@ public class Player extends Actor getWorld().removeObjects(getWorld().getObjects(Spike.class)); getWorld().removeObjects(getIntersectingObjects(Spike.class)); - getWorld().removeObject(getWorld().getObjects(Heart.class).get(0)); + if (getWorld().getObjects(Heart.class) != null){ + getWorld().removeObject(getWorld().getObjects(Heart.class).get(0)); + } } } diff --git a/SMIMS-Game/PowerUps.class b/SMIMS-Game/PowerUps.class index f4233a4..2322a63 100644 Binary files a/SMIMS-Game/PowerUps.class and b/SMIMS-Game/PowerUps.class differ diff --git a/SMIMS-Game/PowerUps.java b/SMIMS-Game/PowerUps.java index 9e3c868..031769e 100644 --- a/SMIMS-Game/PowerUps.java +++ b/SMIMS-Game/PowerUps.java @@ -34,8 +34,8 @@ public class PowerUps extends Actor public void moveDown() { - this.setLocation(this.getX(), this.getY()+2); - if(this.getY()>=this.getWorld().getHeight()) + setLocation(this.getX(), this.getY()+2); + if(this.getY() >= getWorld().getHeight()-1) { deleteAfterActCycle = true; }