Cleaning up
This commit is contained in:
@@ -190,14 +190,14 @@
|
||||
gameController.GhostCaught(0);
|
||||
return;
|
||||
}
|
||||
Debug.Log($"{gameObject} GhostCaughtQueue with ghost {ghost}");
|
||||
// Debug.Log($"{gameObject} GhostCaughtQueue with ghost {ghost}");
|
||||
ghostScaredQueue.Add(ghost);
|
||||
GhostCaughtExecute(ghost);
|
||||
}
|
||||
|
||||
public void GhostCaughtContinue()
|
||||
{
|
||||
Debug.Log($"{gameObject} GhostCaughtContinue with ghost queue length {ghostScaredQueue.Count}");
|
||||
// Debug.Log($"{gameObject} GhostCaughtContinue with ghost queue length {ghostScaredQueue.Count}");
|
||||
if (!ghostScaredQueue.TryGetValue(0, out DataToken currentGhost))
|
||||
{
|
||||
Debug.LogError("Called GhostCaughtContinue without a ghost in the queue!");
|
||||
@@ -326,9 +326,10 @@
|
||||
pelletTimeoutLimit = PacManConstants.GetGhostHousePelletTimeoutLimitForLevel(level);
|
||||
|
||||
int[] privatePelletCounterReleaseValues = PacManConstants.GetGhostHousePrivatePelletCounterLimitForLevel(level);
|
||||
for (int i = 0; i < Math.Min(sharedPelletCounterReleaseValues.Length, ghosts.Length); i++)
|
||||
for (int i = 0; i < ghosts.Length; i++)
|
||||
{
|
||||
ghosts[i].SetHousePelletCounterLimit(privatePelletCounterReleaseValues[i]);
|
||||
ghosts[i].Reset(); // Reset needed to properly apply level
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user