Player Drehung und Enemy Größe

This commit is contained in:
2026-09-17 11:35:44 +02:00
parent c1de4dad10
commit 8ae09335c0
9 changed files with 65 additions and 58 deletions
+10
View File
@@ -34,6 +34,7 @@ public class Player extends Actor
handlePowerUps();
shootProjectile();
checkHealth();
playerRotation();
//Check ob der Spieler am unteren Fensterrand ist
if (getY()+1 >= getWorld().getHeight()){
@@ -177,4 +178,13 @@ public class Player extends Actor
break;
}
}
public void playerRotation(){
if(Greenfoot.isKeyDown("a")){
setImage("PlayerLeft.png");
}
if(Greenfoot.isKeyDown("d")){
setImage("Player.png");
}
}
}