feat: 적 사망 처리 시스템 개선

- EnemyBase: PlayDeathAnimationRpc로 모든 클라이언트에 사망 애니메이션 동기화
- EnemyAnimationController: 사망 상태에서 애니메이션 업데이트 및 트리거 중단
- BossEnemy: HandleDeath에서 AI 정지 순서 개선 (enabled=false 먼저)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-16 09:46:56 +09:00
parent e31ecadc81
commit 5238b65dc2
3 changed files with 75 additions and 27 deletions

View File

@@ -11,6 +11,7 @@ namespace Colosseum.Enemy
/// 보스 캐릭터. 페이즈 시스템과 동적 AI 전환을 지원합니다.
/// Unity Behavior 패키지를 사용하여 Behavior Tree 기반 AI를 구현합니다.
/// </summary>
public class BossEnemy : EnemyBase
{
[Header("Boss Settings")]
@@ -274,13 +275,16 @@ namespace Colosseum.Enemy
return;
}
base.HandleDeath();
// AI 정지
// AI 완전 중단 (순서 중요: enabled=false를 먼저 호출하여 Update() 차단)
if (behaviorAgent != null)
{
behaviorAgent.enabled = false; // 가장 먼저: Update() 호출 방지
behaviorAgent.End();
behaviorAgent.Graph = null;
}
behaviorAgent = null;
base.HandleDeath();
}
#region Debug