feat: Enhance Physics Perception System with new detection modes and performance optimizations

- Updated PhysicsPerceptionSystem to support seven detection modes: RangeCircle, BatchLOS, FanCast, BoxCast, Sight, RayCast, and TriggerZone.
- Improved documentation for each detection mode, including performance optimization strategies.
- Introduced PerceptionTriggerProxy for event-driven detection in TriggerZone slots.
- Added SightBatchSystem to manage Sight slots efficiently, reducing CPU spikes during high enemy counts.
- Updated SensorSlotNames to reflect new detection modes and their purposes.
- Enhanced internal logic for detecting targets and managing detection events.
This commit is contained in:
2026-06-02 23:18:20 +08:00
parent 150440495d
commit d27ae9407d
17 changed files with 1946 additions and 335 deletions

View File

@@ -7,7 +7,7 @@ namespace BaseGames.Enemies.Perception
///
/// 工作原理:
/// <list type="bullet">
/// <item>读取 <see cref="EnemyBase.HasLineOfSight"/>原始 LOSBatchLOSSystem 写入)。</item>
/// <item>读取 <see cref="EnemyBase.HasLineOfSight"/>由 PhysicsPerceptionSystem 的 LOS/Sight 槽位驱动)。</item>
/// <item>连续感知到玩家超过 <see cref="reactionDelay"/> 秒后,<see cref="IsThreatDetected"/> 才变为 true。</item>
/// <item>一旦丢失 LOS<see cref="IsThreatDetected"/> 立即重置为 false保持对"躲起来"的快速响应)。</item>
/// </list>