Intermission 3

This commit is contained in:
2025-12-21 18:50:57 +01:00
parent 0dd0d87e32
commit 51206b96f4
4 changed files with 87 additions and 5 deletions

View File

@@ -0,0 +1,66 @@
using UnityEngine;
namespace Marro.PacManUdon
{
public partial class GameManager
{
private void TimeSequenceStepIntermission3(int sequenceProgress)
{
var blinky = ghostManager.Ghosts[0];
switch (sequenceProgress)
{
case 0:
// Show just level display
RestartLevel();
statusDisplay.SetLevelDisplayVisible(true);
break;
case 1:
// Start animation, pacman running and blinky prepared to chase
soundManager.SuppressSound(false);
soundManager.StartIntermissionSound();
pacMan.Reset();
pacMan.SetLevel(4);
pacMan.SetPowerPellet(false); // Update speed
pacMan.SetKinematic(true);
pacMan.SetActive(true);
pacMan.SetPosition(intermissionScreenElements[0].transform.localPosition);
pacMan.SetDirection(Vector2.left);
ghostManager.Reset();
ghostManager.SetLevel(5);
ghostManager.SetKinematic(true);
ghostManager.gameObject.SetActive(true);
blinky.SetElroy(2);
blinky.SetPosition(intermissionScreenElements[1].transform.localPosition);
blinky.SetDirection(Vector2.left);
blinky.SetState(PacManGhostState.Normal);
blinky.SetSpecialLook(true);
SetFrozen(false);
break;
case 2:
// Start blinky chasing
blinky.SetActive(true);
break;
case 3:
// Reached end, freeze
pacMan.SetDirection(Vector2.zero);
blinky.SetDirection(Vector2.zero);
break;
case 4:
// Ghost runs back on screen
blinky.SetPosition(intermissionScreenElements[3].transform.localPosition);
blinky.SetDirection(Vector2.right);
break;
case 5:
// End cutscene
soundManager.StopAllSound();
SetFrozen(true);
StartTimeSequence(PacManTimeSequence.StartNewLevel);
break;
}
}
}
}