Separated time sequences
This commit is contained in:
25
Assets/Scripts/Sequences/GhostCaught.cs
Normal file
25
Assets/Scripts/Sequences/GhostCaught.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
public partial class GameManager
|
||||
{
|
||||
private void TimeSequenceStepGhostCaught(int sequenceProgress)
|
||||
{
|
||||
switch (sequenceProgress)
|
||||
{
|
||||
case 0:
|
||||
// Freeze and hide pacman, but let ghosts already in the caught animation continue
|
||||
SetFrozen(true, ghostIgnoreIfCaught: true);
|
||||
SetPacManActive(false);
|
||||
soundManager.PlayGhostEatSound();
|
||||
break;
|
||||
case 1:
|
||||
// Unfreeze and reveal pacman
|
||||
SetPacManActive(true);
|
||||
SetFrozen(false);
|
||||
ghostManager.GhostCaughtContinue();
|
||||
soundManager.SetGhostRetreat(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user