Separated time sequences
This commit is contained in:
41
Assets/Scripts/Sequences/StartNewLevel.cs
Normal file
41
Assets/Scripts/Sequences/StartNewLevel.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
public partial class GameManager
|
||||
{
|
||||
private void TimeSequenceStepStartNewLevel(int sequenceProgress)
|
||||
{
|
||||
switch (sequenceProgress)
|
||||
{
|
||||
case 0:
|
||||
// Reset, show maze and score display
|
||||
InitializeLevel();
|
||||
RestartLevel();
|
||||
SetMazeVisible(true);
|
||||
statusDisplay.SetScoreDisplayVisible(true);
|
||||
soundManager.SuppressSound(false);
|
||||
break;
|
||||
case 1:
|
||||
// Increment level, show ready, show pellets, show lives indicators
|
||||
IncrementLevel();
|
||||
statusDisplay.SetExtraLivesDisplayVisible(true);
|
||||
statusDisplay.SetReadyTextVisible(true);
|
||||
SetPelletsActive(true);
|
||||
break;
|
||||
case 2:
|
||||
// Show pacman, show ghosts
|
||||
SetPacManActive(true);
|
||||
SetGhostsActive(true);
|
||||
break;
|
||||
case 3:
|
||||
// Hide ready
|
||||
statusDisplay.SetReadyTextVisible(false);
|
||||
break;
|
||||
case 4:
|
||||
// Unfreeze
|
||||
SetFrozen(false);
|
||||
soundManager.StartGhostSound();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user