기본 수정사항

This commit is contained in:
2026-08-06 09:30:08 +09:00
parent 15914d23a2
commit 6d6d452922
29 changed files with 666 additions and 25 deletions

View File

@@ -202,6 +202,12 @@ private async Awaitable PlayBeat(StoryBeat beat)
// 도달한 종료 노드가 정한다. 중간에 끊기면(씬 전환 등) false로 남아 장소 BGM으로 복귀한다.
bool keepBgmOnEnd = false;
// 대화 전에 떠 있던 화면 그림 — 끝나면 이 상태로 되돌린다.
// 제스처·표정 Animator를 되돌리는 것과 같은 취지다: 대화는 장소 화면을 잠시 빌려 쓸 뿐이라
// 장소에 서 있던 인물이 대화 한 번 했다고 사라지거나 표정이 굳어 있으면 안 된다.
var frontBefore = FrontSprite.Instance != null ? FrontSprite.Instance.Current : null;
var sideBefore = SideSprite.Instance != null ? SideSprite.Instance.Current : null;
try
{
var node = beat.Group.StartNode;
@@ -285,6 +291,10 @@ private async Awaitable PlayBeat(StoryBeat beat)
if (SoundManager.Instance != null && !keepBgmOnEnd)
SoundManager.Instance.ClearOverrideBGM();
// 화면 그림 복원 — Show(null)은 Hide()와 같으므로 "대화 전에 아무것도 없었다"도 그대로 처리된다
if (FrontSprite.Instance != null) FrontSprite.Instance.Show(frontBefore);
if (SideSprite.Instance != null) SideSprite.Instance.Show(sideBefore);
RestoreDefaultAnimations();
}
}
@@ -341,6 +351,9 @@ private async Awaitable<bool> PlayNode(DialogNode node)
if (node.Sfx != null && SoundManager.Instance != null)
SoundManager.Instance.PlaySFX(node.Sfx);
// 화면 그림(앞/옆) — BGM과 같은 규칙으로 비우면 변경 없음
ApplySprites(node);
// 보이스 재생
if (node.Voice != null && node.Speaker != null)
{
@@ -376,6 +389,23 @@ private async Awaitable<bool> PlayNode(DialogNode node)
return false;
}
// 노드가 지정한 화면 그림을 반영한다.
// 비어 있는 지정은 "변경 없음"이라(BGM과 같은 규칙) 인물이 서 있는 동안 매 대사에 다시 꽂을 필요가 없다.
// 지우기를 먼저, 지정을 나중에 처리한다 — 한 노드에서 둘 다 걸면 새 그림이 이긴다.
private static void ApplySprites(DialogNode node)
{
var front = FrontSprite.Instance;
var side = SideSprite.Instance;
bool hasFront = front != null;
bool hasSide = side != null;
if (hasFront && node.ClearSprite is SpriteClear.Front or SpriteClear.Both) front.Hide();
if (hasSide && node.ClearSprite is SpriteClear.Side or SpriteClear.Both) side.Hide();
if (hasFront && node.FrontSprite != null) front.Show(node.FrontSprite);
if (hasSide && node.SideSprite != null) side.Show(node.SideSprite);
}
// 호감도 분기 노드의 조건식 평가.
// 각 조건의 JoinWithNext로 이어 붙이며, AND가 OR보다 우선순위가 높다:
// A and B or C → (A and B) or C