디버깅용 로그 제거
This commit is contained in:
@@ -101,16 +101,15 @@ namespace Northbound
|
||||
_agent.acceleration = 8f;
|
||||
_agent.angularSpeed = 120f;
|
||||
_agent.stoppingDistance = attackRange * 0.7f;
|
||||
_agent.autoBraking = true;
|
||||
_agent.updateRotation = true;
|
||||
_agent.updateUpAxis = false;
|
||||
|
||||
if (!_agent.isOnNavMesh)
|
||||
{
|
||||
Debug.LogWarning($"<color=orange>[EnemyAI] {gameObject.name}이(가) NavMesh 위에 있지 않습니다!</color>");
|
||||
}
|
||||
|
||||
if (aiType == TeamType.Monster)
|
||||
_agent.autoBraking = true;
|
||||
_agent.updateRotation = true;
|
||||
_agent.updateUpAxis = false;
|
||||
|
||||
if (!_agent.isOnNavMesh)
|
||||
{
|
||||
}
|
||||
|
||||
if (aiType == TeamType.Monster)
|
||||
{
|
||||
FindCore();
|
||||
TransitionToState(EnemyAIState.MoveToCore);
|
||||
@@ -248,7 +247,7 @@ namespace Northbound
|
||||
GameObject target = GetTargetPlayer();
|
||||
if (target == null)
|
||||
{
|
||||
if (showDebugInfo) Debug.Log("<color=red>[EnemyAI] 타겟 상실 - 상태 해제</color>");
|
||||
if (showDebugInfo) {}
|
||||
OnLostTarget();
|
||||
return;
|
||||
}
|
||||
@@ -417,19 +416,11 @@ namespace Northbound
|
||||
{
|
||||
damageable.TakeDamage(attackDamage, NetworkObjectId);
|
||||
_lastAttackTime = Time.time;
|
||||
|
||||
OnAttackPerformed?.Invoke(target);
|
||||
|
||||
if (showDebugInfo)
|
||||
Debug.Log($"<color=red>[EnemyAI] {gameObject.name} -> {target.name} 타격 성공! (데미지: {attackDamage})</color>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 3. 만약 IDamageable을 못 찾았다면 로그를 남겨서 범인을 찾습니다.
|
||||
if (showDebugInfo)
|
||||
Debug.LogWarning($"<color=yellow>[EnemyAI] {target.name}에 IDamageable 스크립트가 없습니다!</color>");
|
||||
|
||||
// 공격할 수 없는 대상이면 상태를 해제합니다.
|
||||
OnLostTarget();
|
||||
}
|
||||
@@ -504,9 +495,9 @@ namespace Northbound
|
||||
// 사망 상태로 전환
|
||||
TransitionToState(EnemyAIState.Dead);
|
||||
ClearTargetPlayer();
|
||||
|
||||
|
||||
if (showDebugInfo)
|
||||
Debug.Log($"<color=red>[EnemyAI] {gameObject.name}이(가) 사망했습니다. (killer: {killerId})</color>");
|
||||
{}
|
||||
}
|
||||
|
||||
private void OnLostTarget()
|
||||
|
||||
Reference in New Issue
Block a user