Files
PacManUdon/Assets/Scripts/Sequences/GhostCaught.cs
2026-06-22 13:11:00 +02:00

29 lines
883 B
C#

namespace Marro.PacManUdon
{
public partial class GameManager
{
private void TimeSequenceStepGhostCaught(int sequenceProgress)
{
switch (sequenceProgress)
{
case 0:
// Freeze and hide pacman, but let ghosts already in the caught animation continue
SetFrozen(true, ghostIgnoreIfCaught: true);
SetPacManActive(false);
soundManager.PlayGhostEatSound();
break;
case 1:
break;
}
}
private void TimeSequenceFinalizeGhostCaught()
{
// Unfreeze and reveal pacman
SetPacManActive(true);
SetFrozen(false); // This also makes the caught ghost return home
soundManager.SetGhostRetreat(true);
}
}
}