fix: 보스 패턴 애니메이션 전환 안정화

- SkillController를 패턴 경계 기준으로 분기해 보스 첫 스킬은 즉시 시작하고 마지막 스킬만 Idle로 부드럽게 복귀하도록 조정
- 보스 패턴 실행 중 현재 스킬이 첫/마지막 스텝인지 BossBehaviorRuntimeState와 패턴 실행 경로에서 공유하도록 확장
- 패턴 내부 연속 클립 전환은 하드 전환으로 유지해 시작 프레임 스킵과 중간 Idle 복귀 문제를 줄이고 종료 전환 시간을 별도 노출
This commit is contained in:
2026-04-11 14:18:29 +09:00
parent 5d58397fe0
commit 12a481b596
4 changed files with 344 additions and 32 deletions

View File

@@ -210,6 +210,10 @@ namespace Colosseum.Enemy
yield break;
}
runtimeState.SetCurrentPatternSkillBoundary(
startsFromIdle: IsFirstSkillStep(pattern, i),
returnsToIdle: IsLastSkillStep(pattern, i));
GameObject stepTarget = currentTarget;
if (step.Skill.JumpToTarget)
{
@@ -339,6 +343,8 @@ namespace Colosseum.Enemy
if (isChargeWaiting)
EndChargeWait(broken: false);
runtimeState?.SetCurrentPatternSkillBoundary(false, false);
if (currentPattern != null && runtimeState != null)
{
if (applyCooldown)
@@ -355,6 +361,36 @@ namespace Colosseum.Enemy
chargeTelegraphApplied = false;
}
private static bool IsFirstSkillStep(BossPatternData pattern, int stepIndex)
{
if (pattern == null || pattern.Steps == null)
return false;
for (int i = 0; i < pattern.Steps.Count; i++)
{
PatternStep candidate = pattern.Steps[i];
if (candidate != null && candidate.Type == PatternStepType.Skill && candidate.Skill != null)
return i == stepIndex;
}
return false;
}
private static bool IsLastSkillStep(BossPatternData pattern, int stepIndex)
{
if (pattern == null || pattern.Steps == null)
return false;
for (int i = pattern.Steps.Count - 1; i >= 0; i--)
{
PatternStep candidate = pattern.Steps[i];
if (candidate != null && candidate.Type == PatternStepType.Skill && candidate.Skill != null)
return i == stepIndex;
}
return false;
}
private void ApplyPatternFlowState(BossPatternData pattern)
{
if (runtimeState == null || pattern == null)