Fix: Game crasht nicht mehr bei damage auf 0 Leben und PowerUps werden wieder gelöscht wenn sie den unteren Fensterrand

This commit is contained in:
2026-09-17 10:05:50 +02:00
parent 5cf095c370
commit 9a0d7e7f7a
6 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -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;
}