Add boosters to minigame again

This commit is contained in:
Michal Pikulski
2025-11-07 17:26:25 +01:00
parent ea12766cf7
commit 2127bf37b2
4 changed files with 193 additions and 43 deletions

View File

@@ -668,16 +668,20 @@ namespace Minigames.DivingForPictures
if (giver != null)
{
UIPageController.Instance.ShowAllUI();
giver.GiveBooster(() => { completed = true; });
Logging.Debug("[DivingGameManager] Starting booster giver sequence");
giver.GiveBooster(() =>
{
completed = true;
Logging.Debug("[DivingGameManager] Booster giver completed callback received");
});
// 2) Wait for it to finish (with a safety timeout in case it's not wired)
float timeout = 10f; // fallback to avoid blocking forever
float elapsed = 0f;
while (!completed && elapsed < timeout)
// 2) Wait for it to finish (NO timeout - wait indefinitely for user interaction)
while (!completed)
{
elapsed += Time.unscaledDeltaTime;
yield return null;
}
Logging.Debug("[DivingGameManager] Booster giver sequence finished, proceeding to game over");
}
else
{