Dump VO done
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user