추격 포기로 인한 복귀 시, 복귀하는 동안 무적 상태 + 체력 전체 회복

This commit is contained in:
2026-02-25 21:13:06 +09:00
parent d066290607
commit 34ab12a093
2 changed files with 43 additions and 0 deletions

View File

@@ -916,6 +916,16 @@ namespace Northbound
switch (state)
{
case EnemyAIState.Idle:
_agent.isStopped = true;
_agent.ResetPath();
// 즉시 정지를 위해 velocity 초기화
_agent.velocity = Vector3.zero;
// 복귀 완료 - 무적 해제
if (_enemyUnit != null)
{
_enemyUnit.SetInvulnerable(false);
}
break;
case EnemyAIState.Attack:
_agent.isStopped = true;
_agent.ResetPath();
@@ -940,6 +950,12 @@ namespace Northbound
_agent.isStopped = false;
_agent.speed = moveSpeed;
_agent.SetDestination(_originPosition);
// 복귀 시작 - 체력 회복 및 무적
if (_enemyUnit != null)
{
_enemyUnit.HealToFull();
_enemyUnit.SetInvulnerable(true);
}
break;
case EnemyAIState.Dead:
_agent.isStopped = true;