Added remaining ghosts incl. movment-strategies
This commit is contained in:
@ -4,10 +4,15 @@ import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import se.urmo.game.collision.GhostCollisionChecker;
|
||||
import se.urmo.game.entities.BlinkyStrategy;
|
||||
import se.urmo.game.entities.ClydeStrategy;
|
||||
import se.urmo.game.entities.Ghost;
|
||||
import se.urmo.game.entities.GhostMode;
|
||||
import se.urmo.game.entities.InkyStrategy;
|
||||
import se.urmo.game.entities.PacMan;
|
||||
import se.urmo.game.entities.PinkyStrategy;
|
||||
import se.urmo.game.entities.ScatterToBottomLeft;
|
||||
import se.urmo.game.entities.ScatterToBottomRight;
|
||||
import se.urmo.game.entities.ScatterToTopLeft;
|
||||
import se.urmo.game.entities.ScatterToTopRight;
|
||||
import se.urmo.game.map.GameMap;
|
||||
import se.urmo.game.util.LoadSave;
|
||||
@ -39,11 +44,14 @@ public class GhostManager {
|
||||
|
||||
public GhostManager(GhostCollisionChecker ghostCollisionChecker) {
|
||||
loadAnimation();
|
||||
|
||||
// Create ghosts with their strategies
|
||||
ghosts.add(new Ghost(ghostCollisionChecker, new BlinkyStrategy(),new ScatterToTopLeft(), image[0]));
|
||||
ghosts.add(new Ghost(ghostCollisionChecker, new PinkyStrategy(),new ScatterToTopRight(), image[1]));
|
||||
//ghosts.add(new Ghost(240, 200, new InkyStrategy(), loader.getSprite("inky")));
|
||||
//ghosts.add(new Ghost(260, 200, new ClydeStrategy(), loader.getSprite("clyde")));
|
||||
Ghost blinky = new Ghost(ghostCollisionChecker, new BlinkyStrategy(), new ScatterToTopRight(), image[0]);
|
||||
ghosts.add(blinky);
|
||||
ghosts.add(new Ghost(ghostCollisionChecker, new PinkyStrategy(),new ScatterToTopLeft(), image[2]));
|
||||
ghosts.add(new Ghost(ghostCollisionChecker,new InkyStrategy(blinky), new ScatterToBottomRight(), image[1]));
|
||||
Ghost clyde = new Ghost(ghostCollisionChecker, new ClydeStrategy(), new ScatterToBottomLeft(), image[3]);
|
||||
ghosts.add(clyde);
|
||||
setMode(GhostMode.CHASE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user