Compare commits

..

2 Commits

6 changed files with 7 additions and 5 deletions
Binary file not shown.
+2 -2
View File
@@ -57,8 +57,8 @@ public class MyWorld extends World
plattform2.setLocation(320,367); plattform2.setLocation(320,367);
plattform2.setLocation(312,371); plattform2.setLocation(312,371);
plattform2.setLocation(308,382); plattform2.setLocation(308,382);
Healthbar healthbar = new Healthbar(); //Healthbar healthbar = new Healthbar();
addObject(healthbar,50,50); //addObject(healthbar,50,50);
Heart heart = new Heart(); Heart heart = new Heart();
addObject(heart,371,27); addObject(heart,371,27);
Heart heart2 = new Heart(); Heart heart2 = new Heart();
Binary file not shown.
+3 -1
View File
@@ -121,7 +121,9 @@ public class Player extends Actor
getWorld().removeObjects(getWorld().getObjects(Spike.class)); getWorld().removeObjects(getWorld().getObjects(Spike.class));
getWorld().removeObjects(getIntersectingObjects(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));
}
} }
} }
Binary file not shown.
+2 -2
View File
@@ -34,8 +34,8 @@ public class PowerUps extends Actor
public void moveDown() public void moveDown()
{ {
this.setLocation(this.getX(), this.getY()+2); setLocation(this.getX(), this.getY()+2);
if(this.getY()>=this.getWorld().getHeight()) if(this.getY() >= getWorld().getHeight()-1)
{ {
deleteAfterActCycle = true; deleteAfterActCycle = true;
} }