대화 프로토타입

This commit is contained in:
2026-06-19 17:09:36 +09:00
parent 3c8daa9c8d
commit 711c9a5986
24 changed files with 985 additions and 66 deletions

View File

@@ -33,11 +33,10 @@ private void Awake()
}
}
public void Play()
public async Awaitable Play()
{
if(_dialogGroups.Count > 0)
_ = Play(_dialogGroups[0].DialogGroupName);
}
public async Awaitable Play(string groupName)
@@ -71,6 +70,8 @@ public async Awaitable Play(string groupName)
finally
{
IsPlaying = false;
if (DialogHud.Instance != null)
DialogHud.Instance.Hide();
RestoreDefaultAnimations();
RestoreRotations();
}
@@ -133,8 +134,9 @@ private async Awaitable RotateToRotation(Transform target, Quaternion targetRota
private async Awaitable PlayNode(DialogNode node)
{
var speakerName = node.Speaker != null ? node.Speaker.Name : "(누구?)";
Debug.Log($"[{speakerName}] {node.TalkText}");
// 화자 옆 DialogHud에 대사 표시
if (DialogHud.Instance != null)
DialogHud.Instance.Show(node.Speaker, node.TalkText);
// 보이스 재생
if (node.Voice != null && node.Speaker != null)
@@ -182,7 +184,7 @@ private async Awaitable<int> WaitForChoice(DialogNode node)
Debug.LogWarning("[DialogPlayer] ChoiceHud 없음 — 0번 자동 선택");
return 0;
}
return await ChoiceHud.Instance.Show(node.Speaker, node.ChoiceQuestion ,node.Choices);
return await ChoiceHud.Instance.Show(node.ChoiceQuestion, node.Choices);
}