Add boosters to minigame again
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user