Minigame audio and intros p1

This commit is contained in:
journaliciouz
2025-12-19 01:57:45 +01:00
parent a83834369e
commit 886eb9cbeb
66 changed files with 2601 additions and 480 deletions

View File

@@ -1,5 +1,6 @@
using UnityEngine;
using Core.Lifecycle;
using UnityEngine.Audio;
namespace Minigames.BirdPooper
{
@@ -32,6 +33,12 @@ namespace Minigames.BirdPooper
// timestamp of last poop spawn
private float _lastPoopTime = -Mathf.Infinity;
// Audio stuff
public bool firstTimePlaying;
public AppleAudioSource audioSource;
public AudioResource poopingIntro;
public AudioResource poopingOutro;
internal override void OnManagedAwake()
{
base.OnManagedAwake();
@@ -109,6 +116,12 @@ namespace Minigames.BirdPooper
/// </summary>
public void BeginMinigame()
{
if (firstTimePlaying)
{
audioSource.audioSource.resource = poopingIntro;
audioSource.Play(0);
firstTimePlaying = false;
}
// Initialize game state
_isGameOver = false;
_targetsHit = 0;
@@ -181,6 +194,9 @@ namespace Minigames.BirdPooper
_isGameOver = true;
Debug.Log($"[BirdPooperGameManager] Player damaged - Game Over! Targets Hit: {_targetsHit}");
audioSource.audioSource.resource = poopingOutro;
audioSource.Play(0);
// Stop spawning obstacles
if (obstacleSpawner != null)