diff --git a/Assets/Scripts/EnemyAIController.cs b/Assets/Scripts/EnemyAIController.cs index 8e87a1c..bce4ccb 100644 --- a/Assets/Scripts/EnemyAIController.cs +++ b/Assets/Scripts/EnemyAIController.cs @@ -154,6 +154,15 @@ namespace Northbound if (_isRecalculatingPath) return; // 코루틴 대기 중이면 중단 if (_coreTransform == null) { FindCore(); return; } + // 0. Player 감지 (코어로 가는 도중에도 Player를 타겟팅) + GameObject detectedPlayer = DetectTarget(); + if (detectedPlayer != null) + { + SetTargetPlayer(detectedPlayer); + TransitionToState(EnemyAIState.ChasePlayer); + return; + } + // 1. 코어로 가는 경로가 '완전(Complete)'한지 먼저 확인 // NavMesh가 갱신되었다면 에이전트는 즉시 Complete 상태가 됩니다. if (_agent.hasPath && _agent.pathStatus == NavMeshPathStatus.PathComplete)