More sound stuff

This commit is contained in:
2025-12-13 20:30:54 +01:00
parent 42a32f5fe4
commit a2779ab31b
14 changed files with 286 additions and 49 deletions

View File

@@ -227,17 +227,33 @@
public void GhostReturned()
{
Debug.Log("Ghost returned");
bool noGhostsScared = true;
bool noGhostsRetreating = true;
foreach (var ghost in ghosts)
{
var state = ghost.GetGhostState();
if (ghost.IsScared)
{
noGhostsScared = false;
}
if (state == PacManGhostState.CaughtScore || state == PacManGhostState.Returning || state == PacManGhostState.Entering)
{
return;
noGhostsRetreating = false;
}
}
gameController.NoGhostsRetreating();
if (noGhostsScared)
{
gameController.NoGhostsScared();
}
if (noGhostsRetreating)
{
gameController.NoGhostsRetreating();
}
}
void SetGhostBlinking(bool blinking)