Simplified GhostManager restart more

This commit is contained in:
2026-06-22 15:34:02 +02:00
parent d739c9d7b5
commit a32df1bd09
3 changed files with 1 additions and 7 deletions

View File

@@ -139,7 +139,6 @@ namespace Marro.PacManUdon
mazeSpriteAnimator.SetBool("Blinking", false);
ghostManager.RestartLevel(afterLifeLost);
ghostManager.NewLevel();
pacMan.Reset();
bonusFruit.Despawn();
soundManager.Reset();

View File

@@ -95,10 +95,7 @@ namespace Marro.PacManUdon
}
SetScattering(true, reverseDirection: false);
}
public void NewLevel()
{
SetSharedPelletCounterActive(false);
UpdateElroyLevel(collisionManager.PelletCount);
foreach (Ghost ghost in ghosts)
@@ -292,9 +289,8 @@ namespace Marro.PacManUdon
for (int i = 0; i < ghosts.Length; i++)
{
ghosts[i].SetHousePelletCounterLimit(privatePelletCounterReleaseValues[i]);
ghosts[i].UpdateSpeed();
}
RestartLevel(); // Reset needed to properly apply level
}
private void SetLevelConstants(int level)

View File

@@ -92,7 +92,6 @@ namespace Marro.PacManUdon
pacMan.SetPosition(attractScreenElements[16].transform.localPosition);
pacMan.SetDirection(Direction.Left);
ghostManager.RestartLevel();
ghostManager.SetLevel(2);
ghostManager.SetKinematic(true);
ghostManager.SetActive(true);