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(afterLifeLost: true);
                    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:
                    break;
            }
        }

        private void TimeSequenceFinalizeRestartLevel()
        {
            // Unfreeze
            SetFrozen(false);
            soundManager.SuppressSound(false);
            soundManager.StartGhostSound();
        }
    }
}
