kleine hitbox für geister
parent
eb8bb01e17
commit
c1559fd691
BIN
bin/Game.class
BIN
bin/Game.class
Binary file not shown.
|
@ -399,10 +399,10 @@ public class Game {
|
|||
|
||||
for (int i = 0; i < ghosts.length; i++) {
|
||||
ghosts[i].setLocation(ghosts[i].getPos('x', dt), ghosts[i].getPos('y', dt));
|
||||
if (player.getPos('x', 0) < ghosts[i].getPos('x', 0) + 20
|
||||
&& player.getPos('x', 0) > ghosts[i].getPos('x', 0) - 20
|
||||
&& player.getPos('y', 0) < ghosts[i].getPos('y', 0) + 20
|
||||
&& player.getPos('y', 0) > ghosts[i].getPos('y', 0) - 20)
|
||||
if (player.getPos('x', 0) < ghosts[i].getPos('x', 0) + 18
|
||||
&& player.getPos('x', 0) > ghosts[i].getPos('x', 0) - 18
|
||||
&& player.getPos('y', 0) < ghosts[i].getPos('y', 0) + 14
|
||||
&& player.getPos('y', 0) > ghosts[i].getPos('y', 0) - 14)
|
||||
if (ghosts[0].feared) {
|
||||
ghosts[i].setIsDead(true);
|
||||
ghosts[i].setDeathTimer(1000);
|
||||
|
|
Loading…
Reference in New Issue