ui
This commit is contained in:
@@ -68,10 +68,10 @@ public async Awaitable Play()
|
||||
// 다른 NPC가 실제 대사를 재생 중이면 무시 — 대화 중 다른 NPC 상호작용 차단
|
||||
if (_entryInProgress != null) return;
|
||||
|
||||
// 다른 NPC의 선택 메뉴가 떠 있으면 먼저 취소한다.
|
||||
// 다른 NPC의 대화 선택 메뉴가 떠 있으면 먼저 취소한다.
|
||||
// (취소된 쪽의 Play가 이 자리에서 HUD 숨김 등 정리를 마친 뒤에 이쪽이 시작된다)
|
||||
if (ChoiceHud.Instance != null)
|
||||
ChoiceHud.Instance.CancelPending();
|
||||
if (DialogEnterHud.Instance != null)
|
||||
DialogEnterHud.Instance.CancelPending();
|
||||
|
||||
// 선택 메뉴가 떠 있는 동안에도 재진입을 막아야 하므로 여기서 잠근다.
|
||||
IsPlaying = true;
|
||||
@@ -116,9 +116,9 @@ private async Awaitable PlayGroupForced(DialogGroup group)
|
||||
if (group == null || IsPlaying) return;
|
||||
if (_entryInProgress != null) return; // 다른 NPC가 대사 재생 중
|
||||
|
||||
// 다른 NPC의 선택 메뉴가 떠 있으면 먼저 취소
|
||||
if (ChoiceHud.Instance != null)
|
||||
ChoiceHud.Instance.CancelPending();
|
||||
// 다른 NPC의 대화 선택 메뉴가 떠 있으면 먼저 취소
|
||||
if (DialogEnterHud.Instance != null)
|
||||
DialogEnterHud.Instance.CancelPending();
|
||||
|
||||
IsPlaying = true;
|
||||
PushActive();
|
||||
@@ -156,10 +156,10 @@ private List<StoryBeat> FindPlayableBeats()
|
||||
return lm.Database.GetPlayableBeats(lm.Current, _voice.Character);
|
||||
}
|
||||
|
||||
// 재생 가능한 대화가 여럿일 때 ChoiceHud로 플레이어에게 고르게 한다. 취소되면 null.
|
||||
// 재생 가능한 대화가 여럿일 때 DialogEnterHud로 플레이어에게 고르게 한다. 취소되면 null.
|
||||
private async Awaitable<StoryBeat> SelectBeat(List<StoryBeat> playable)
|
||||
{
|
||||
if (ChoiceHud.Instance == null)
|
||||
if (DialogEnterHud.Instance == null)
|
||||
return playable[0]; // 선택 UI가 없으면 기존처럼 최상단 우선
|
||||
|
||||
var options = new List<DialogChoice>(playable.Count);
|
||||
@@ -173,12 +173,12 @@ private async Awaitable<StoryBeat> SelectBeat(List<StoryBeat> playable)
|
||||
|
||||
try
|
||||
{
|
||||
int picked = await ChoiceHud.Instance.Show(null, options);
|
||||
int picked = await DialogEnterHud.Instance.Show(options);
|
||||
return playable[picked];
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// 대기 중 ChoiceHud가 비활성화됨(씬 전환 등) — 재생하지 않음
|
||||
// 대기 중 DialogEnterHud가 비활성화됨(씬 전환 등) — 재생하지 않음
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user