kleine hitbox für geister

master
leventius imperatus 2020-06-08 17:09:44 +02:00
parent eb8bb01e17
commit c1559fd691
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -399,10 +399,10 @@ public class Game {
for (int i = 0; i < ghosts.length; i++) { for (int i = 0; i < ghosts.length; i++) {
ghosts[i].setLocation(ghosts[i].getPos('x', dt), ghosts[i].getPos('y', dt)); ghosts[i].setLocation(ghosts[i].getPos('x', dt), ghosts[i].getPos('y', dt));
if (player.getPos('x', 0) < ghosts[i].getPos('x', 0) + 20 if (player.getPos('x', 0) < ghosts[i].getPos('x', 0) + 18
&& player.getPos('x', 0) > ghosts[i].getPos('x', 0) - 20 && player.getPos('x', 0) > ghosts[i].getPos('x', 0) - 18
&& player.getPos('y', 0) < ghosts[i].getPos('y', 0) + 20 && player.getPos('y', 0) < ghosts[i].getPos('y', 0) + 14
&& player.getPos('y', 0) > ghosts[i].getPos('y', 0) - 20) && player.getPos('y', 0) > ghosts[i].getPos('y', 0) - 14)
if (ghosts[0].feared) { if (ghosts[0].feared) {
ghosts[i].setIsDead(true); ghosts[i].setIsDead(true);
ghosts[i].setDeathTimer(1000); ghosts[i].setDeathTimer(1000);