Fix Health

This commit is contained in:
2026-09-17 09:24:04 +02:00
parent f7f611c2ae
commit c719e5b053
13 changed files with 102 additions and 67 deletions
+12
View File
@@ -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());
}
}
}
}