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

@@ -641,6 +641,9 @@ namespace Marro.PacManUdon
case PacManTimeSequence.Intermission2:
TimeSequenceStepIntermission2(sequenceProgress);
break;
case PacManTimeSequence.Intermission3:
TimeSequenceStepIntermission3(sequenceProgress);
break;
}
}
@@ -678,6 +681,8 @@ namespace Marro.PacManUdon
return DeltaToAbsolute(new float[] { 0, 0.316f, 0.3f, 3.96f, 2.25f, 3.93f });
case PacManTimeSequence.Intermission2:
return DeltaToAbsolute(new float[] { 0, 0.25f, 0.083f, 0.3f, 1.43f, 2.5f, 1.816f, 1.25f, 0.017f, 1f, 1.966f, 0.033f });
case PacManTimeSequence.Intermission3:
return DeltaToAbsolute(new float[] { 0, 0.316f, 0.7f, 3.35f, 0.83f, 3.67f });
}
}

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;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4f4714f9d9e4e8a4682d26d67d5ac4c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1889,8 +1889,8 @@ TextureImporter:
y: 112
width: 32
height: 16
alignment: 0
pivot: {x: 0.5, y: 0.5}
alignment: 9
pivot: {x: 0.75, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@@ -1910,8 +1910,8 @@ TextureImporter:
y: 112
width: 32
height: 16
alignment: 0
pivot: {x: 0.5, y: 0.5}
alignment: 9
pivot: {x: 0.75, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@@ -2289,7 +2289,7 @@ TextureImporter:
width: 16
height: 16
alignment: 0
pivot: {x: 0, y: 0}
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []