Intermission 2
This commit is contained in:
89
Assets/Scripts/Sequences/Intermission2.cs
Normal file
89
Assets/Scripts/Sequences/Intermission2.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
public partial class GameManager
|
||||
{
|
||||
private void TimeSequenceStepIntermission2(int sequenceProgress)
|
||||
{
|
||||
var blinky = ghostManager.Ghosts[0];
|
||||
|
||||
switch (sequenceProgress)
|
||||
{
|
||||
case 0:
|
||||
// Show just level display
|
||||
RestartLevel();
|
||||
statusDisplay.SetLevelDisplayVisible(true);
|
||||
break;
|
||||
case 1:
|
||||
// Show pole
|
||||
SetIntermissionScreenVisible(true);
|
||||
intermission2Pole.Reset();
|
||||
break;
|
||||
case 2:
|
||||
// Start music
|
||||
soundManager.SuppressSound(false);
|
||||
soundManager.StartIntermissionSound();
|
||||
break;
|
||||
case 3:
|
||||
// Start animation, pacman running and blinky prepared to chase
|
||||
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);
|
||||
|
||||
SetFrozen(false);
|
||||
break;
|
||||
case 4:
|
||||
// Start blinky chasing
|
||||
blinky.SetActive(true);
|
||||
break;
|
||||
case 5:
|
||||
// Blinky catches on pole
|
||||
blinky.SetSpeed(1.25f);
|
||||
break;
|
||||
case 6:
|
||||
// Blinky cover about to tear
|
||||
blinky.SetFrozen(true);
|
||||
break;
|
||||
case 7:
|
||||
// Blinky cover tears
|
||||
intermission2Pole.SetStrechLevel(PoleStrechLevels.Separated);
|
||||
break;
|
||||
case 8:
|
||||
// Blinky sprite updates with broken cover
|
||||
blinky.SetSpecialLook(true);
|
||||
blinky.SetDirection(Vector2.up);
|
||||
blinky.SetPosition(blinky.GetPosition() + new Vector2(-0.250f, 0f));
|
||||
break;
|
||||
case 9:
|
||||
// Blinky looks at broken cover
|
||||
blinky.SetDirection(Vector2.down);
|
||||
break;
|
||||
case 10:
|
||||
// Cutscene starts to unload
|
||||
blinky.SetDirection(Vector2.zero);
|
||||
break;
|
||||
case 11:
|
||||
// End cutscene
|
||||
SetIntermissionScreenVisible(false);
|
||||
soundManager.StopAllSound();
|
||||
SetFrozen(true);
|
||||
StartTimeSequence(PacManTimeSequence.StartNewLevel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user