글로벌 오브젝트 추가
This commit is contained in:
@@ -55,6 +55,12 @@ public void MoveTo(LocationData location)
|
||||
if (location == null || DialogPlayer.IsAnyActive) return;
|
||||
|
||||
Current = location;
|
||||
|
||||
// 장소 BGM = SoundManager의 기본 BGM 층. 대화용 BGM(Override)이 걷히면 이 곡으로 돌아온다.
|
||||
// 비어 있으면 변경하지 않는다 — 노드 BGM과 같은 규칙(비면 변경 없음)이다.
|
||||
if (location.Bgm != null && SoundManager.Instance != null)
|
||||
SoundManager.Instance.SetDefaultBGM(location.Bgm);
|
||||
|
||||
if (_currentInstance != null) Destroy(_currentInstance);
|
||||
_currentInstance = location.Prefab != null
|
||||
? Instantiate(location.Prefab, _locationRoot)
|
||||
|
||||
@@ -45,7 +45,7 @@ private void Awake()
|
||||
}
|
||||
|
||||
// 씬이 바뀌면 이전 씬에서 남은 전용(Override) BGM을 정리한다 (ISceneInitializable).
|
||||
// 새 씬의 SceneBgm.Start가 SetDefaultBGM으로 그 씬의 곡을 넘겨주면 그대로 재생된다.
|
||||
// 기본 BGM 층은 LocationManager.MoveTo가 장소 입장 시 SetDefaultBGM으로 넘겨준다.
|
||||
public void OnSceneLoaded() => ClearOverrideBGM();
|
||||
|
||||
private void Initialize()
|
||||
|
||||
Reference in New Issue
Block a user