Files
PacManUdon/Assets/Scripts/Sequences/RestartLevel.cs
2025-12-14 17:05:24 +01:00

45 lines
1.4 KiB
C#

namespace Marro.PacManUdon
{
public partial class GameManager
{
private void TimeSequenceStepRestartLevel(int sequenceProgress)
{
switch (sequenceProgress)
{
case 0:
// Hide playfield and pellets
SetMazeVisible(false);
SetPelletsActive(false);
break;
case 1:
// Make maze visible
RestartLevel();
SetMazeVisible(true);
break;
case 2:
// Take life, show ready, show pellets
DecrementLives();
statusDisplay.SetReadyTextVisible(true);
SetPelletsActive(true);
break;
case 3:
// Show pacman, show ghosts
SetPacManActive(true);
SetGhostsActive(true);
break;
case 4:
// Hide ready
statusDisplay.SetReadyTextVisible(false);
break;
case 5:
// Unfreeze
SetFrozen(false);
soundManager.SuppressSound(false);
soundManager.StartGhostSound();
soundManager.UpdatePelletCount(pelletCountRemaining);
break;
}
}
}
}