Browse Source

added functionality for pill in Cell

remotes/origin/player
fdai7910 11 months ago
parent
commit
74ac629091
  1. 5
      src/main/java/pacmanGame/Cell.java

5
src/main/java/pacmanGame/Cell.java

@ -4,6 +4,7 @@ public class Cell {
public Vector2 pos; public Vector2 pos;
public String type; public String type;
public final Map map; public final Map map;
public GameManager gameManager;
public Cell(Vector2 pos, String type, Map map) { public Cell(Vector2 pos, String type, Map map) {
this.pos = pos; this.pos = pos;
@ -18,7 +19,9 @@ public class Cell {
public void triggerPill() { public void triggerPill() {
this.type = "empty"; this.type = "empty";
//todo: code
gameManager.score += 100;
int timeStopPillEffect = gameManager.time + 200;
//ghost.triggerPillEffect(timeStopPillEffect);
} }
public void triggerFruit() { public void triggerFruit() {

Loading…
Cancel
Save