Files
zeling_v2/Assets/_Game/Scripts/Enemies/Perception/SensorSlotNames.cs
Joywayer 06048c966a feat: Add HurtBoxOwnerGuard to prevent multiple damage registrations from the same HitBox activation
- Implemented HurtBoxOwnerGuard to ensure that multiple HurtBoxes on the same character do not register damage multiple times during a single HitBox activation.
- Added custom editor for HitBox to facilitate the creation of shape colliders with HitBoxColliderProxy.
- Introduced PhysicsPerceptionSystem for enemy perception, supporting multiple detection modes including RangeCircle, BatchLOS, FanCast, and BoxCast.
- Created EnemyPatrolZone to define patrol and chase areas for enemies, allowing for shared zones among multiple enemies.
- Added BD_IsOutsideZone conditional task for Behavior Designer to check if an enemy or player is outside a defined patrol zone.
2026-06-02 16:10:44 +08:00

34 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace BaseGames.Enemies.Perception
{
/// <summary>
/// <see cref="PhysicsPerceptionSystem"/> 槽位名称常量。
///
/// 统一定义字符串键,避免在 BD Task Inspector 和代码中散布魔法字符串。
/// Prefab 上 <see cref="PhysicsPerceptionSystem"/> 组件的 slotName 字段必须与此处常量保持一致。
/// </summary>
public static class SensorSlotNames
{
/// <summary>
/// 警戒范围RangeCircle玩家进入此圈触发 Alert 阶段。
/// 通常半径大于攻击范围,小于视线检测范围。
/// </summary>
public const string Aggro = "aggro";
/// <summary>
/// 视线检测BatchLOS敌我之间无遮挡时持续为 true。
/// 由 BatchLOSSystem 批量计算BD_IsPlayerVisible 读取结果。
/// </summary>
public const string LOS = "los";
/// <summary>
/// 近战攻击范围RangeCircle玩家进入时触发近战攻击条件。
/// </summary>
public const string AttackMelee = "attack_melee";
/// <summary>
/// 远程攻击范围RangeCircle玩家进入时触发远程攻击条件。
/// </summary>
public const string AttackRange = "attack_range";
}
}