Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f70e394f01 | |||
| 9a0d7e7f7a |
Binary file not shown.
@@ -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();
|
||||
|
||||
Binary file not shown.
@@ -121,9 +121,11 @@ public class Player extends Actor
|
||||
getWorld().removeObjects(getWorld().getObjects(Spike.class));
|
||||
|
||||
getWorld().removeObjects(getIntersectingObjects(Spike.class));
|
||||
if (getWorld().getObjects(Heart.class) != null){
|
||||
getWorld().removeObject(getWorld().getObjects(Heart.class).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkHealth(){
|
||||
if (health <= 0){
|
||||
|
||||
Binary file not shown.
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user