Fix Health
This commit is contained in:
@@ -23,6 +23,7 @@ public class TemporaryGround extends Plattform
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
this.Buffer();
|
||||
Lebensdauer--;
|
||||
if(Lebensdauer==0)
|
||||
{
|
||||
@@ -56,4 +57,15 @@ public class TemporaryGround extends Plattform
|
||||
{
|
||||
Lebensdauer=pDuration;
|
||||
}
|
||||
|
||||
public void Buffer()
|
||||
{
|
||||
{
|
||||
Player player= this.getWorld().getObjects(Player.class).get(0);
|
||||
if(this.intersects(player))
|
||||
{
|
||||
player.setLocation(player.getX(), this.getY()-this.getImage().getHeight());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user