namespace Marro.PacManUdon
{
    public partial class GameManager
    {
        private void TimeSequenceStepStartNewGame(int sequenceProgress)
        {
            switch (sequenceProgress)
            {
                case 0:
                    // Prepare new game, hide everything except score bar
                    gameState = PacManGameState.InGame;

                    InitializeNewGame();
                    PrepareForCutscene();
                    
                    soundManager.SuppressSound(false);
                    soundManager.PlayGameStartSound();
                    break;
                case 1:
                    // Show maze, lives indicator, level indicator, player 1 and ready text
                    SetPelletsActive(true);
                    SetMazeVisible(true);
                    statusDisplay.SetExtraLivesDisplayVisible(true);
                    statusDisplay.SetLevelDisplayVisible(true);
                    statusDisplay.SetPlayer1TextVisible(true);
                    statusDisplay.SetReadyTextVisible(true);
                    statusDisplay.SetLabel1UPTextBlinking(true);
                    break;
                case 2:
                    // Subtract a life
                    DecrementLives();
                    break;
                case 3:
                    // Remove Player 1 text
                    statusDisplay.SetPlayer1TextVisible(false);
                    break;
                case 4:
                    // Show ghosts and pacman
                    SetGhostsActive(true);
                    SetPacManActive(true);
                    break;
                case 5:
                    // Remove ready text
                    statusDisplay.SetReadyTextVisible(false);
                    break;
                case 6:
                    break;
            }
        }

        private void TimeSequenceFinalizeStartNewGame()
        {
            // Start game, end sequence
            soundManager.StartGhostSound();
            SetFrozen(false);
        }
    }
}
