2026-07-10 대화 BGM,이펙트

This commit is contained in:
2026-07-10 17:27:11 +09:00
parent bda7752fb3
commit 932aad8c56
26 changed files with 1984 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
@@ -29,6 +30,9 @@ public class EventZone : MonoBehaviour
public static bool IsAnyPlaying => _playingCount > 0;
private static int _playingCount;
// 존이 실제로 발동(기록)되는 순간 ZoneId와 함께 호출 (SceneBgm 등에서 구독)
public static event Action<string> OnZoneTriggered;
public string ZoneId => string.IsNullOrEmpty(_zoneId) ? name : _zoneId;
// 잠글 때 켜져 있던 프로바이더만 기록해서, 해제 시 원래 꺼져 있던 것까지 켜지 않도록 한다.
@@ -52,6 +56,7 @@ private void OnTriggerEnter(Collider other)
if (story != null)
story.RecordZoneTriggered(ZoneId);
_hasPlayed = true;
OnZoneTriggered?.Invoke(ZoneId);
if (_timeline == null)
{