2026-06-11 사운드시스템 (BaseScene참고)

This commit is contained in:
skrwns304@gmail.com
2026-06-11 15:32:56 +09:00
parent 6a20f521ce
commit 9f173a4ebc
23 changed files with 640 additions and 6 deletions

View File

@@ -1,9 +1,16 @@
using System;
using UnityEngine;
public class GameManager : MonoBehaviour,ISceneInitializable
{
public static GameManager Instance;
//현재 플레이어가 위치한 구역 (구역 상태의 단일 진실 출처)
public Zone CurrentZone { get; private set; } = Zone.None;
//구역이 바뀌면 발생. 사운드 등 여러 시스템이 구독해서 반응한다.
public event Action<Zone> OnZoneChanged;
private void Awake()
{
if (Instance == null)
@@ -17,8 +24,16 @@ private void Awake()
}
}
//구역 변경 요청 (ZoneTrigger 등에서 호출)
public void SetZone(Zone zone)
{
if (zone == CurrentZone) return; //같은 구역이면 무시
CurrentZone = zone;
OnZoneChanged?.Invoke(zone); //구독자(SoundManager 등)에게 통지
}
public void OnSceneLoaded()
{
{
}
}