Fix Health
This commit is contained in:
@@ -15,7 +15,13 @@ public class Groundflower extends PowerUps
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
bewegeNachUnten();
|
||||
this.touchedByPlayer();
|
||||
this.setLocation(this.getX(), this.getY()+2);
|
||||
if(this.getY()>=this.getWorld().getHeight()-5)
|
||||
{
|
||||
this.getWorld().removeObject(this);
|
||||
return;
|
||||
}
|
||||
this.touchedByPlayer();
|
||||
// Add your action code here.
|
||||
}
|
||||
@@ -29,9 +35,9 @@ public class Groundflower extends PowerUps
|
||||
public void bewegeNachUnten()
|
||||
{
|
||||
this.setLocation(this.getX(), this.getY()+2);
|
||||
if(this.getY()>=this.getWorld().getHeight())
|
||||
if(this.getY()>=this.getWorld().getHeight()-5)
|
||||
{
|
||||
this.getWorld().removeObject(this);
|
||||
this.getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user