Separated time sequences

This commit is contained in:
2025-12-14 16:50:47 +01:00
parent a2a576a0c9
commit 8cf3f95af9
30 changed files with 1034 additions and 886 deletions

View File

@@ -0,0 +1,50 @@
namespace Marro.PacManUdon
{
public partial class GameManager
{
private void TimeSequenceStepPacManCaught(int sequenceProgress)
{
switch (sequenceProgress)
{
case 0:
// Freeze (except for the ghost animations)
SetFrozen(true, ghostKeepAnimating: true);
soundManager.StopAllSound();
break;
case 1:
// Hide ghosts, start pacman death animation
SetGhostsActive(false);
pacMan.SetDead(true);
break;
case 2:
// Start playing death sound
soundManager.PlayDeathSound();
break;
case 3:
// Hide pacman, start next state
SetPacManActive(false);
if (gameState == PacManGameState.AttractModeDemo)
{
break;
}
if (extraLives > 0)
{
InsertTimeSequence(PacManTimeSequence.RestartLevel);
break;
}
InsertTimeSequence(PacManTimeSequence.GameOver);
break;
case 4:
if (gameState == PacManGameState.AttractModeDemo)
{
#if RECORDING_DEMO
// recorder.gameObject.SetActive(false);
#endif
InsertTimeSequence(PacManTimeSequence.AttractScreenIntroduction);
}
break;
}
}
}
}