Dump VO done

This commit is contained in:
journaliciouz
2025-12-19 01:01:28 +01:00
parent 934c67a106
commit a83834369e
12 changed files with 676 additions and 112 deletions

View File

@@ -1,6 +1,9 @@
using Core;
using Core.Lifecycle;
using Items;
using System;
using UnityEngine;
using UnityEngine.Audio;
namespace Minigames.TrashMaze.Core
{
@@ -21,6 +24,13 @@ namespace Minigames.TrashMaze.Core
[Header("Exit")]
[SerializeField] private Transform exitPosition;
public AppleAudioSource audioSource;
public AudioResource mazeStartAudio;
public AudioResource mazeEndAudio;
// Placeholder refs until maze implemented 4 real
public ControllerSwitchItem pulverControllerSwitch;
public ControllerSwitchItem trafalgarControllerSwitch;
// Cached shader property IDs for performance
private static readonly int WorldSizeID = Shader.PropertyToID("_WorldSize");
@@ -115,8 +125,24 @@ namespace Minigames.TrashMaze.Core
}
Logging.Debug($"[TrashMazeController] Pulver controller initialized at {pulverController.transform.position}");
// TODO: Implement proper events for maze start and finish
pulverControllerSwitch.OnCharacterSwitch.AddListener(SwitchedToPulver);
trafalgarControllerSwitch.OnCharacterSwitch.AddListener(SwitchedToTrafalgar);
}
private void SwitchedToTrafalgar()
{
audioSource.audioSource.resource = mazeEndAudio;
audioSource.Play(0);
}
private void SwitchedToPulver()
{
audioSource.audioSource.resource = mazeStartAudio;
audioSource.Play(0);
}
/// <summary>
/// Called when player reaches the maze exit
/// </summary>
@@ -131,7 +157,9 @@ namespace Minigames.TrashMaze.Core
_mazeCompleted = true;
Logging.Debug("[TrashMazeController] Maze completed! Player reached exit.");
audioSource.audioSource.resource = mazeEndAudio;
audioSource.Play(0);
// TODO: Trigger completion events
// - Award booster packs collected
// - Open gate for Trafalgar