From 7b8364cb96338ac02690e6f8b27c197ee2d27526 Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Mon, 5 Feb 2024 22:52:19 +0100 Subject: [PATCH] added update fonction inside GameManager --- src/main/java/pacmanGame/GameManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/pacmanGame/GameManager.java b/src/main/java/pacmanGame/GameManager.java index ff8c542..62063b7 100644 --- a/src/main/java/pacmanGame/GameManager.java +++ b/src/main/java/pacmanGame/GameManager.java @@ -27,9 +27,11 @@ public class GameManager { } public void Update() { - visualizer.Update(); - if(time%5 == 0) { - player.Move(); + if(!isPaused) { + visualizer.Update(); + if(time%5 == 0) { + player.Move(); + } } time++; }