디버깅용 로그 제거

This commit is contained in:
2026-02-16 22:17:37 +09:00
parent 2f624f621c
commit f73c660579
21 changed files with 65 additions and 258 deletions

View File

@@ -41,16 +41,6 @@ namespace Northbound
{
_building = GetComponent<Building>();
_teamMember = GetComponent<ITeamMember>();
if (_building == null)
{
Debug.LogError($"<color=red>[AutoTargetSystem] {gameObject.name}에 Building 컴포넌트가 없습니다!</color>");
}
if (_teamMember == null)
{
Debug.LogError($"<color=red>[AutoTargetSystem] {gameObject.name}에 ITeamMember 컴포넌트가 없습니다!</color>");
}
}
private void Update()
@@ -72,10 +62,9 @@ namespace Northbound
// 범위 내 모든 콜라이더 탐지
Collider[] colliders = Physics.OverlapSphere(transform.position, detectionRange, targetLayer);
if (showDebugInfo && colliders.Length > 0)
{
Debug.Log($"<color=cyan>[AutoTarget] {gameObject.name}이(가) {colliders.Length}개의 오브젝트를 감지했습니다.</color>");
}
GameObject closestEnemy = null;
@@ -100,21 +89,16 @@ namespace Northbound
}
}
if (targetTeam == null)
{
if (showDebugInfo)
{
Debug.Log($"<color=yellow>[AutoTarget] {col.gameObject.name}에 ITeamMember가 없습니다.</color>");
}
continue;
}
if (targetTeam == null)
{
continue;
}
// 적대 관계 확인
bool canAttack = TeamManager.CanAttack(_teamMember, targetTeam);
if (showDebugInfo)
{
Debug.Log($"<color=yellow>[AutoTarget] {gameObject.name} ({TeamManager.GetTeamName(_teamMember.GetTeam())}) → {col.gameObject.name} ({TeamManager.GetTeamName(targetTeam.GetTeam())}): 공격가능={canAttack}</color>");
}
if (!canAttack)
@@ -153,22 +137,14 @@ namespace Northbound
_lastAttackTime = Time.time;
// 모든 클라이언트에 빔 효과 표시
ShowAttackBeamClientRpc(beamStart, beamEnd);
var targetTeam = closestEnemy.GetComponent<ITeamMember>() ??
closestEnemy.GetComponentInParent<ITeamMember>() ??
closestEnemy.GetComponentInChildren<ITeamMember>();
Debug.Log($"<color=red>[AutoTarget] {gameObject.name} ({TeamManager.GetTeamName(_teamMember.GetTeam())})이(가) {closestEnemy.name} ({TeamManager.GetTeamName(targetTeam?.GetTeam() ?? TeamType.Neutral)})을(를) 공격! (거리: {closestDistance:F2}m, 데미지: {attackDamage})</color>");
ShowAttackBeamClientRpc(beamStart, beamEnd);
}
else
{
Debug.LogWarning($"<color=orange>[AutoTarget] {closestEnemy.name}에 IDamageable이 없습니다.</color>");
}
}
else if (showDebugInfo && colliders.Length > 0)
{
Debug.Log($"<color=yellow>[AutoTarget] {gameObject.name}이(가) 공격 가능한 적을 찾지 못했습니다.</color>");
}
}