From 74ac6290911014daa3517e94d5b3b66133f1d2dd Mon Sep 17 00:00:00 2001 From: fdai7910 Date: Sun, 4 Feb 2024 19:16:41 +0100 Subject: [PATCH] added functionality for pill in Cell --- src/main/java/pacmanGame/Cell.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/pacmanGame/Cell.java b/src/main/java/pacmanGame/Cell.java index 46d21e3..b9dcb48 100644 --- a/src/main/java/pacmanGame/Cell.java +++ b/src/main/java/pacmanGame/Cell.java @@ -4,6 +4,7 @@ public class Cell { public Vector2 pos; public String type; public final Map map; + public GameManager gameManager; public Cell(Vector2 pos, String type, Map map) { this.pos = pos; @@ -18,7 +19,9 @@ public class Cell { public void triggerPill() { this.type = "empty"; - //todo: code + gameManager.score += 100; + int timeStopPillEffect = gameManager.time + 200; + //ghost.triggerPillEffect(timeStopPillEffect); } public void triggerFruit() {