Added intermission1

This commit is contained in:
2025-12-20 18:28:50 +01:00
parent 8cf3f95af9
commit fb539bfdf5
17 changed files with 1036 additions and 124 deletions

View File

@@ -44,7 +44,7 @@
private int scatterPatternIndex;
// Elroy logic
private int elroyLevel;
public int elroyLevel;
private int pelletsRemaining;
// Ghost house logic
@@ -55,6 +55,7 @@
private float pelletTimeoutLimit;
private bool frozen;
private bool kinematic;
// This should be called once when the game is initialized
public void Initialize(GameObject[] ghostTargets, PacMan pacMan, GameManager gameController)
@@ -83,6 +84,8 @@
sharedPelletCounter = 0;
pelletTimeout = 0;
elroyLevel = 0;
frozen = false;
kinematic = false;
foreach (Ghost ghost in ghosts)
{
@@ -110,7 +113,7 @@
public void FixedUpdate()
{
// gameStateManager.statusDisplay.SetDebugText(1, this.blinkCountdown.ToString());
if (frozen)
if (frozen || kinematic)
{
return;
}
@@ -310,6 +313,7 @@
public void SetLevel(int level)
{
Debug.Log($"GhostManager: SetLevel {level}");
speedDefault = PacManConstants.GetGhostDefaultSpeedForLevel(level);
speedScared = PacManConstants.GetGhostScaredSpeedForLevel(level);
speedReturn = 15f;
@@ -471,6 +475,7 @@
public void SetKinematic(bool kinematic)
{
this.kinematic = kinematic;
foreach (Ghost ghost in ghosts)
{
ghost.SetKinematic(kinematic);