Separated time sequences
This commit is contained in:
44
Assets/Scripts/Sequences/RestartLevel.cs
Normal file
44
Assets/Scripts/Sequences/RestartLevel.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user