|
|
@ -7,7 +7,8 @@ public class GameManager { |
|
|
|
public Visualizer visualizer; |
|
|
|
public Player player; |
|
|
|
public int score = 0; |
|
|
|
public Boolean ghostIsEdible = false; |
|
|
|
public boolean ghostIsEdible = false; |
|
|
|
public int timeStopPillEffect; |
|
|
|
|
|
|
|
public GameManager() { |
|
|
|
setupGame(); |
|
|
@ -35,6 +36,10 @@ public class GameManager { |
|
|
|
if (time == 600) { |
|
|
|
destroyCherry(); |
|
|
|
} |
|
|
|
if(ghostIsEdible) { |
|
|
|
if(time == timeStopPillEffect) |
|
|
|
ghostIsEdible = false; |
|
|
|
} |
|
|
|
time++; |
|
|
|
} |
|
|
|
|
|
|
@ -78,11 +83,4 @@ public class GameManager { |
|
|
|
public void updatePlayerCell() { |
|
|
|
map.GetCell(player.position).triggerItem(); |
|
|
|
} |
|
|
|
|
|
|
|
public void makeGhostEdible(int timeStopPillEffect) { |
|
|
|
ghostIsEdible = true; |
|
|
|
if(time == timeStopPillEffect) { |
|
|
|
ghostIsEdible = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |