Commit Graph
25 Commits
Author SHA1 Message Date
joywayer 4808077fc6 feat(enemy): ContactChaseAbility 改造为 RushAbility(冲锋)
- 起手前锁定玩家 X 与方向(committed),终点改为身体整体越过锁定点(Body.HasPassed)
- 终止条件:越过锁定点/撞墙(只判墙)/最大冲刺时长(SO 新增 maxDashDuration)/净位移卡死
- 冲锋期间经 EnemyMoveInput.AllowLedgeCross 放开悬崖夹紧,可冲下崖不悬停边缘
- 类与文件重命名(GUID 保留),脚手架与向导同步更新
2026-07-27 13:38:05 +08:00
joywayer 6026911532 feat(enemy): EnemyBase 持有身体几何权威(_bodyCollider + Body),Awake/OnValidate 双重校验 2026-07-27 11:51:45 +08:00
joywayer 6fd80cfec9 fix(enemy): BuildAttackSelector 表达式上下文全限定 AbilityCategory(消歧义于 Abilities 属性) 2026-07-24 12:22:35 +08:00
joywayer 702df35efd feat(enemy): ICombatant 增加 HasEligibleAttack/UseBestAttack + EnemyBase 构建选择器 2026-07-24 12:20:54 +08:00
joywayer 36aa2006e4 @
feat(enemy): E001 追击动画 Skill_Start/Loop/End 完整化,符合设计文档

依据 Docs/Game/Design/小怪设计-程序开发文档-01.md:感知→Skill_Start(张口,单次)
→Skill_Loop(快速爬行追击,循环)→丢失目标→Skill_End(收招,单次)→Move_Patrol,
E001 无警觉态。

原问题:ContactChaseAbility 的 loop/end clip 都空、无 start clip,追击全程无
动画;Approach 步态还错播 Move;有多余警觉态(Alert clip 也空)。

- ContactChaseAbility:加 _startClip;协程 Skill_Start(锁动画+等时长,不伤人)→
  开伤害+Approach+Skill_Loop(循环)→退出播 Skill_End。丢失目标(ExternalRequest
  中断)播 Skill_End;受击/死亡硬打断不播。
- EnemyBase:加动画锁 LockAnim/IsAnimLocked——一次性招式动画期间步态不覆盖;
  PlayLocomotionClip 的 Approach 改为不驱动步态(追击动画归能力)。
- EnemyLocomotion:锁定期不算"已应用",解锁后重同步步态(避免卡在 Skill_End)。
- ENM_E001_Stats:HasAlertState=false(设计无警觉态)。
- prefab + 脚手架:ContactChaseAbility 接线 Skill_Start/Loop/End;新增
  AssignClipTransition 助手(按名+路径定位同名 clip)。

PlayMode 验证:Skill_Start(locked/不伤人)→Skill_Loop(伤害开)→Skill_End
(locked)→步态恢复 Move,全链符合设计。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
2026-07-10 16:27:02 +08:00
joywayer a4b9729de7 @
fix(enemy): 巡逻边缘不越界 + 卡死兜底 + Locomotion 惰性发现

- WouldBlockAhead(EnemyMovement):按请求方向从碰撞体前缘(bounds.max/min.x)
  即时射线判墙/悬崖,天然考虑碰撞体宽度;MoveHorizontal 据此夹紧前进,保证
  "碰撞体边缘停在地形边缘、不越界"。移动层夹紧与 Pace 翻向共用同一判定,
  避免"夹停却不掉头"。nav 走 MoveWithSpeed 不受影响。
- Pace 加窗口净位移卡死兜底:撞上未挂检测层的墙/卡角(含贴墙微抖)也能翻向,
  用净位移而非逐帧差以免微抖重置计数。
- EnemyBase.Locomotion 改惰性发现:关域重载下 Awake 设的实例字段可能残留
  为 null,首次访问按需补发现,编辑器/构建都不为空(此前致入口态偶发 NRE)。

PlayMode(跨调用取样,避免 Thread.Sleep 冻结主线程)验证:Pace 来回踱步、
遇边缘/墙掉头、碰撞体不越界。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
2026-07-10 15:12:28 +08:00
joywayerandClaude Opus 4.8 6a34b42db0 fix(enemy): 终审修复——删死代码群体警戒、修 Waypoints 到达推进、补 Locomotion 缺失报错
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 14:05:56 +08:00
joywayerandClaude Opus 4.8 f7554b1a65 refactor(enemy): 删除 EnemyStatsSO 死字段(感知/击退/攻击等,已迁 sensor槽/DamageSourceSO)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 13:43:51 +08:00
joywayerandClaude Opus 4.8 d718b99685 refactor(enemy): 删除 AiPhase 影子层,动画统一由 locomotion/反应态/能力驱动
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 13:38:27 +08:00
joywayerandClaude Opus 4.8 347d0e2f50 feat(enemy): EnemyLocomotion 按模式驱动步态动画(Idle/Walk/Alert/Run)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 13:33:16 +08:00
joywayerandClaude Opus 4.8 8c1a8647bb feat(enemy): EnemyBase 经接口发现并暴露 Locomotion(IEnemyLocomotion)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 12:06:41 +08:00
joywayerandClaude Opus 4.8 6c27993e09 feat(ai): 敌人感知↔状态模型——待机/警觉/追击/巡逻 + 可复用感知状态机
感知门面 EnemyBase.InChaseZone(追逐/aggro)/InVisionZone(视野/los,缺省回退aggro),纯查询;
转换逻辑归 AI 层: 新增可复用 PerceptionStateMachine(统一规则,HasAlert/视野缺省自动降级);
规则: 未发现进视野→警觉, 进追逐→追击(委托能力), 追击脱离视野→巡逻(永不回警觉,再进视野再警觉).
EnemyStatsSO.HasAlertState 勾选项; ContactChaseAbility 改纯执行器(退出由AI中断); E001 用可复用件.
PlayMode 验证四态转换全通过.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 15:10:39 +08:00
joywayerandClaude Opus 4.8 63e241af92 fix(ai): AiRuntime 自转换设为no-op(根治死亡双发Died再入) + EnemyBase.OnSpawn复位brain.enabled + 测试
Switch 对 target==当前态直接 no-op(不重跑Exit/Enter),循环改为 if(Switch(t))return true;
OnSpawn 复用时恢复被 QuotaManager 裁剪禁用的 brain。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:26:28 +08:00
joywayer 23a3a1c274 refactor(ai): EnemyBase/QuotaManager 移除 Opsive BT,改接 EnemyAiBrain(Brain访问器/Died信号/OnSpawn重置/LOD裁剪) 2026-07-03 15:10:55 +08:00
joywayerandClaude Opus 4.8 0491e3f919 fix(combat): 统一受击无敌闸门并修复 DoT 失效
将无敌判定收口到 PlayerController.TakeDamage(DamageInfo) 单一闸门并认 DamageFlags.IgnoreIFrame,PlayerStats 拆出原始扣血 ApplyDamage;新增 DamageFlags.IsDoT,持续伤害只扣血不打断硬直、不授予无敌。修复 DoT 绕过 HurtBox 时被 flag-blind 的整数 TakeDamage 静默吞没、且 FinalDamage 未结算(恒为0)的双重失效;敌人侧 DoT 标记 IsDoT 避免每 Tick 重置硬直。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 16:30:56 +08:00
joywayer ebf0c97320 refactor(enemy): 敌人专属子类改为零代码配置型行为组件 2026-06-09 15:56:44 +08:00
joywayer d27ae9407d 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.
2026-06-02 23:18:20 +08:00
joywayer 150440495d feat: Register and unregister BatchLOSSystem in EnemyBase lifecycle methods 2026-06-02 16:23:14 +08:00
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
joywayer bcd8b0e90b feat: Update enemy AI and movement systems
- Enhanced Physics2D layer collision report with new interactions between Player and Enemy layers.
- Refactored BD_InvestigateLastKnown to streamline animation handling and improve readability.
- Simplified BD_MaintainCombatDistance by consolidating movement stop logic.
- Updated BD_MoveToPlayer to set AI phase on start.
- Improved BD_Patrol logic with better handling of stuck states and path failures.
- Enhanced BD_PatrolWaypoints to manage stuck conditions and retry logic more effectively.
- Refined BD_ReturnToHome to remove unnecessary animation calls.
- Updated BD_WalkRandom to ensure AI phase is set correctly on start.
- Improved EnemyAbilityBase to delegate target facing to the movement system.
- Enhanced EnemyBase with new movement methods for better control.
- Refactored EnemyMovement to introduce a new input system for handling movement and facing.
- Added EnemyMoveInput struct to encapsulate movement intentions.
- Updated Physics2DSettings to reflect new layer collision matrix.
- Introduced RTK CLI instructions for optimized command usage.
2026-05-29 17:01:59 +08:00
joywayer 5ad6ed8ae6 feat: Enhance CameraZoneMigrationTool with rectilinear polygon reconstruction and fallback handling
- Implemented a new method for reconstructing rectilinear polygons from trigger points.
- Added a fallback mechanism using nearest neighbor ordering and 2-opt optimization for irregular shapes.
- Updated point sorting to ensure counter-clockwise orientation for polygon colliders.

fix: Suppress validation warnings during batch enemy placement in SceneObjectPlacerTool

- Introduced a static property in EnemyBase to suppress validation warnings during editor object placement.
- Updated SceneObjectPlacerTool to utilize this property when creating enemy game objects.

refactor: Clean up OnValidate method in EnemyBase to respect suppression flag

- Modified OnValidate to check for the suppression flag before logging warnings about missing configurations.
2026-05-26 16:17:24 +08:00
joywayer 5a0f1548ea Refactor code structure for improved readability and maintainability 2026-05-26 13:04:38 +08:00
joywayer a1b4e629aa feat: Implement Room Streaming System
- Add RoomStreamingManager to manage room loading and unloading based on player proximity.
- Create StreamingBudgetConfigSO for memory and performance budgeting of the streaming system.
- Introduce TransitionDirector to handle seamless and atmospheric fade transitions between rooms.
- Develop WorldGraph to represent room connectivity and facilitate neighbor queries and distance calculations.
- Implement RoomNode and RoomEdge classes to structure room data and connections.
2026-05-23 19:10:29 +08:00
joywayer 47bdc67cdf feat: Implement DownDash ability and related systems
- Added DownDash ability with cooldown and speed configuration.
- Introduced DownDashState to handle down dashing mechanics, including gravity manipulation and animation playback.
- Updated PlayerMovement to support DownDash functionality.
- Enhanced PlayerStats to manage spring charge consumption and healing.
- Modified PlayerCombat and WeaponHitBoxInstance to support new hit confirmation events.
- Updated AbilityType to include new form types for character abilities.
- Improved Gizmos for better visualization of enemy detection and attack ranges.
- Added feedback systems for form switching in PlayerFeedback and IFeedbackPlayer.
- Refactored combat and movement states to accommodate new abilities and ensure smooth transitions.
2026-05-22 00:09:50 +08:00
joywayer f264329751 摄像机区域的架构改动 2026-05-15 14:47:24 +08:00