- 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.
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
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";
|
||
}
|
||
}
|