Fixed FrightenedGhostMode blinking

This commit is contained in:
Urban Modig
2025-09-06 21:18:55 +02:00
parent c696e666d0
commit 4b262362be

View File

@ -23,7 +23,7 @@ public class FrightenedGhostMode extends AbstractGhostModeImpl {
private boolean isBlinking = false; private boolean isBlinking = false;
public FrightenedGhostMode(Ghost ghost) { public FrightenedGhostMode(Ghost ghost) {
super(ghost, new FearStrategy(), ghost.getLevelManager(), 8); super(ghost, new FearStrategy(), ghost.getLevelManager(), ghost.getAnimation());
strategy = new FearStrategy(); strategy = new FearStrategy();
} }
@ -35,7 +35,7 @@ public class FrightenedGhostMode extends AbstractGhostModeImpl {
@Override @Override
public BufferedImage[] getAnimation() { public BufferedImage[] getAnimation() {
return (isBlinking ? FEAR_ANIMATION : super.getAnimation()); return (!isBlinking ? FEAR_ANIMATION : super.getAnimation());
} }
@Override @Override