fix: 보스 패턴 애니메이션 전환 안정화
- SkillController를 패턴 경계 기준으로 분기해 보스 첫 스킬은 즉시 시작하고 마지막 스킬만 Idle로 부드럽게 복귀하도록 조정 - 보스 패턴 실행 중 현재 스킬이 첫/마지막 스텝인지 BossBehaviorRuntimeState와 패턴 실행 경로에서 공유하도록 확장 - 패턴 내부 연속 클립 전환은 하드 전환으로 유지해 시작 프레임 스킵과 중간 Idle 복귀 문제를 줄이고 종료 전환 시간을 별도 노출
This commit is contained in:
@@ -252,6 +252,10 @@ public abstract partial class BossPatternActionBase : Action
|
||||
return Status.Failure;
|
||||
}
|
||||
|
||||
runtimeState.SetCurrentPatternSkillBoundary(
|
||||
startsFromIdle: IsFirstSkillStep(currentStepIndex),
|
||||
returnsToIdle: IsLastSkillStep(currentStepIndex));
|
||||
|
||||
GameObject skillTarget = activeTarget;
|
||||
if (step.Skill.JumpToTarget)
|
||||
{
|
||||
@@ -376,6 +380,7 @@ public abstract partial class BossPatternActionBase : Action
|
||||
if (isChargeWaiting)
|
||||
EndChargeWait(broken: false);
|
||||
|
||||
runtimeState?.SetCurrentPatternSkillBoundary(false, false);
|
||||
activePattern = null;
|
||||
activeTarget = null;
|
||||
currentStepIndex = 0;
|
||||
@@ -384,6 +389,36 @@ public abstract partial class BossPatternActionBase : Action
|
||||
waitEndTime = 0f;
|
||||
}
|
||||
|
||||
private bool IsFirstSkillStep(int stepIndex)
|
||||
{
|
||||
if (activePattern == null || activePattern.Steps == null)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < activePattern.Steps.Count; i++)
|
||||
{
|
||||
PatternStep candidate = activePattern.Steps[i];
|
||||
if (candidate != null && candidate.Type == PatternStepType.Skill && candidate.Skill != null)
|
||||
return i == stepIndex;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsLastSkillStep(int stepIndex)
|
||||
{
|
||||
if (activePattern == null || activePattern.Steps == null)
|
||||
return false;
|
||||
|
||||
for (int i = activePattern.Steps.Count - 1; i >= 0; i--)
|
||||
{
|
||||
PatternStep candidate = activePattern.Steps[i];
|
||||
if (candidate != null && candidate.Type == PatternStepType.Skill && candidate.Skill != null)
|
||||
return i == stepIndex;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private Status FinalizeResolvedPattern(BossPatternExecutionResult result)
|
||||
{
|
||||
runtimeState?.CompletePatternExecution(activePattern, result);
|
||||
|
||||
Reference in New Issue
Block a user