Update Cinematic Manager, Hud Manager, fix log verbosity issue, update PauseMenu

This commit is contained in:
Michal Pikulski
2025-11-08 12:07:45 +01:00
parent 6e466cd7aa
commit 4d7c48a681
5 changed files with 55 additions and 37 deletions

View File

@@ -53,18 +53,34 @@ public class AudioManager : ManagedBehaviour, IPausable
protected override void OnManagedAwake()
{
// Auto-registration with GameManager handled by ManagedBehaviour
}
// Initialize lists if they were not set in inspector
criticalVOSources = criticalVOSources ?? new List<AppleAudioSource>();
VOSources = VOSources ?? new List<AppleAudioSource>();
musicSources = musicSources ?? new List<AppleAudioSource>();
ambienceSources = ambienceSources ?? new List<AppleAudioSource>();
SFXSources = SFXSources ?? new List<AppleAudioSource>();
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
_player = QuickAccess.Instance.PlayerGameObject;
_audioListener = QuickAccess.Instance.MainCamera.GetComponent<AudioListener>();
// Perform singleton-dependent initialization here
if (QuickAccess.Instance != null)
{
_player = QuickAccess.Instance.PlayerGameObject;
if (QuickAccess.Instance.MainCamera != null)
{
_audioListener = QuickAccess.Instance.MainCamera.GetComponent<AudioListener>();
}
}
else
{
Debug.LogWarning("[AudioManager] QuickAccess.Instance is null during OnManagedAwake. Some audio references may remain unset.");
}
// Diagnostic
foreach (AppleAudioSource _audioSource in criticalVOSources)
{
Debug.Log("Found source: " + _audioSource.name);
}
Debug.Log("[AudioManager] OnManagedAwake completed");
}
public void SetAudioPauseBehavior(PauseBehavior newPauseBehavior)