Verfolgungsprojektil

This commit is contained in:
2026-09-15 20:55:28 +02:00
parent aae6ac5e41
commit 6127510ec8
4 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -23,7 +23,10 @@ public class TargetingProjectile extends Projectile
int playerX = player.getX();
int playerY = player.getY();
turnTowards(playerX, playerY);
move(3);
move(1);
if(getY() > playerY){
setLocation(getX(),getY()+5);
}
}
}