refactor(enemy): 删除 EnemyStatsSO 死字段(感知/击退/攻击等,已迁 sensor槽/DamageSourceSO)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 13:43:51 +08:00
co-authored by Claude Opus 4.8
parent d718b99685
commit f7554b1a65
4 changed files with 0 additions and 51 deletions
-23
View File
@@ -778,29 +778,6 @@ namespace BaseGames.Enemies
$"[{(_brain != null ? _brain.CurrentStateName : "-")}] {_currentState}");
}
// ── 运行时:LOS 连线 ────────────────────────────────────────
if (!Application.isPlaying || _playerTransform == null) return;
float drawDetectRange = _sensorHub != null
? _sensorHub.GetSensorRadius(Perception.SensorSlotNames.Aggro)
: -1f;
Vector3 eyeWorld = transform.position + new Vector3(_statsSO.EyeOffset.x, _statsSO.EyeOffset.y, 0f);
Vector3 playerPos = _playerTransform.position;
float sqrDist = (playerPos - transform.position).sqrMagnitude;
bool inRange = drawDetectRange >= 0f && sqrDist <= drawDetectRange * drawDetectRange;
// 眼睛位置小圆点(金黄)
Gizmos.color = new Color(1f, 0.9f, 0.2f, 0.85f);
Gizmos.DrawWireSphere(eyeWorld, 0.07f);
if (inRange || HasLineOfSight)
{
Gizmos.color = HasLineOfSight
? new Color(1f, 0.5f, 0f, 0.85f)
: new Color(0.6f, 0.6f, 0.6f, 0.25f);
Gizmos.DrawLine(eyeWorld, playerPos);
}
#endif
}