ADd booster pack reward sequence to bird pooper

This commit is contained in:
Michal Pikulski
2025-12-19 16:41:05 +01:00
parent 2483603803
commit f19f87ce95
4 changed files with 103 additions and 14 deletions

View File

@@ -2,14 +2,12 @@
using UnityEngine;
using UnityEngine.UI;
using Core;
using UI;
namespace Minigames.BirdPooper
{
/// <summary>
/// Game over screen for Bird Pooper minigame.
/// Displays when the player dies and allows restarting the level.
/// Uses unscaled time for UI updates (works when Time.timeScale = 0).
/// </summary>
public class GameOverScreen : MonoBehaviour
{
@@ -53,7 +51,7 @@ namespace Minigames.BirdPooper
}
/// <summary>
/// Show the game over screen and pause the game.
/// Show the game over screen.
/// </summary>
public void Show()
{
@@ -67,11 +65,7 @@ namespace Minigames.BirdPooper
canvasGroup.blocksRaycasts = true;
}
// Pause the game (set timescale to 0)
// PauseMenu uses unscaled time for tweens, so it will still work
Time.timeScale = 0f;
Debug.Log("[GameOverScreen] Game Over - Time.timeScale set to 0");
Debug.Log("[GameOverScreen] Game Over screen shown");
}
/// <summary>
@@ -89,8 +83,6 @@ namespace Minigames.BirdPooper
}
gameObject.SetActive(false);
// Reset time scale BEFORE reloading
Time.timeScale = 1f;
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
await SceneManagerService.Instance.ReloadCurrentScene(progress);
}