More sound stuff
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user