joywayer
568b6e46c0
chore(enemy): 补交新脚本的 .meta(AbilityCategory/AttackSelectionMode/IAttackCandidate/EnemyAttackSelector+测试)
2026-07-24 14:55:17 +08:00
joywayer
022e4f18d2
fix(enemy): Approach 逼近改用 aggro/视野双刷新的 LastKnown(修 aggro 先命中扑向错误点)+补 Attack 退出测试
2026-07-24 12:47:48 +08:00
joywayer
f77ab71555
feat(enemy): 攻击能力射程 Gizmo(选中可见)+ category==Attack 的 rangeRadius 自检
2026-07-24 12:33:16 +08:00
joywayer
04a267b69f
feat(enemy): EnemyAttackSelector 选招器(射程+冷却+LOS+着地过滤,两模式选招)+单测
2026-07-24 12:15:41 +08:00
joywayer
2cf0d6b1a9
feat(enemy): EnemyAbilityBase 实现 IAttackCandidate 契约(自管圆形射程)
2026-07-24 11:58:22 +08:00
joywayer
25fae97065
feat(enemy): 攻击选招元数据(category/weight/圆形射程)与选招模式入 SO
2026-07-24 11:56:07 +08:00
joywayer and Claude Opus 4.8
6f519ec9a9
refactor(enemy): 身体接触伤害改为常驻开启并与能力解耦
...
所有敌人默认常驻身体接触伤害:存活即开、死亡时经 PerformDeath 统一关碰撞体停止。
- ContactChaseAbility/AnimatedCeilingDropAbility 移除对 BodyContactDamage 的开关引用
- BodyContactDamage 语义改为常驻(更新注释)
- 脚手架 SetupHurtAndContactBoxes 去掉 contactEnabled 参数恒为 true,并把
ContactDamageZone 的 HitBox._targetLayers 限定为 PlayerHurtBox(避免常驻后敌人互相误伤)
- 7 个敌人预制体:E001 启用 BodyContactDamage;E002/E004/E005/ChaoFeng 补齐
ContactDamageZone(镜像 HurtBox 身体碰撞体);全部 _targetLayers 收敛为 PlayerHurtBox
- 更新 Docs/Guides/02 敌人搭建指南
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-21 16:18:07 +08:00
joywayer
447575d66e
docs(enemy): 更新迁移后能力脚本残留旧字段名注释为 _cfg.*
2026-07-21 11:45:30 +08:00
joywayer
6d071e83ae
refactor(enemy): Appear/FacePlayer/PlayClip 参数迁入各自子类 SO
2026-07-21 11:35:39 +08:00
joywayer
78c8c6dcd6
refactor(enemy): MeleeVulnerability 参数迁入 MeleeVulnerabilityAbilitySO(子类)
2026-07-21 11:32:20 +08:00
joywayer
34772c3d20
refactor(enemy): AnimatedCeilingDrop 参数迁入 AnimatedCeilingDropAbilitySO(子类)
2026-07-21 11:29:20 +08:00
joywayer
16b0d7b819
refactor(enemy): CeilingHangStrike 参数迁入 CeilingHangStrikeAbilitySO(子类)
2026-07-21 11:26:03 +08:00
joywayer
1e3b01705f
refactor(enemy): RepeatSlam 参数迁入 RepeatSlamAbilitySO(子类)
2026-07-21 11:23:11 +08:00
joywayer
6873a2cd8e
refactor(enemy): ContactChase 参数迁入 ContactChaseAbilitySO(子类)
2026-07-21 11:19:08 +08:00
joywayer
ca36974ec3
feat(enemy): EnemyAbilityBase 加 ResolveConfig<T> 类型化配置解析(不匹配显式报错) + EditMode 测试
2026-07-21 11:14:28 +08:00
joywayer
db55889088
@
...
feat(enemy): 追击起手前先转身朝玩家(播 Flip) + 冲刺速度可配置
- ContactChaseAbility:进入追击先 FaceDirection 朝玩家,若背对则播 Flip 转身、
等 IsTurning 结束后再 Skill_Start(张口)→冲刺;已朝向玩家则跳过转身直接张口。
- 新增 _dashSpeed 字段(<=0 回退 Stats.RunSpeed),冲刺速度可在能力 Inspector 配置。
- E001 EnemyMovement._enableTurnAnimation=true(prefab+脚手架),转向播 AnimConfig.Turn
(Flip),用于巡逻翻边与追击起手前转身;脚手架 PlaceE001 同步。
PlayMode 验证(brain 关隔离):背对玩家→触发追击→clip=Flip(IsTurning)→转向完成
facing 朝玩家→Skill_Start→冲刺→Skill_End,"先转身再张口"成立。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 16:57:41 +08:00
joywayer
9eca69a6ba
@
...
feat(enemy): E001 追击改为冲刺+冷却(朝玩家方向冲,撞墙/边缘停,CD后再冲)
按新设计:进入追击→Skill_Start(张口)→起手后按玩家所在侧一次性确定方向→
速度直冲(非 nav,接触伤害开)→撞墙/到平台边缘(WouldBlockAhead)或受阻即停→
Skill_End(收招)→进入冷却(ABL_E001_Chase.cooldown=1s)。一次冲刺=一次能力执行,
AI 追击态在冷却结束时经 EnsureAbility 重触发下一次冲刺。
- ContactChaseAbility:无限跟随改为有限冲刺;方向 committed(会越过跳开的玩家,
可被躲);加窗口净位移卡死兜底——撞上未在检测层的碰撞体(玩家/边界墙)原地不动
时结束冲刺转收招+冷却,避免卡死。
- ABL_E001_Chase.cooldown 0→1(可在 SO 调)。
PlayMode 验证(净域重载后):Skill_Start→冲刺(实测冲 7 单位、伤害开)→受阻→
Skill_End→冷却→冷却结束重新起手冲刺,完整循环。速度直冲不依赖 nav,敌人实际
位移正常。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 16:46:37 +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 and Claude 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
joywayer and Claude Opus 4.8
1bc6f5bf1c
refactor(ai): Chase 走 Locomotion.Approach;删除 Idle/Patrol/Alert 协程能力与 SO
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 12:24:45 +08:00
joywayer and Claude Opus 4.8
2e2df2b5dd
refactor(ai): E001 贯彻"AI只决策"——每状态=一能力(Model A)
...
AI 决策层(E001CaoZhiAi + PerceptionStateMachine)彻底移除所有 actuation:
不再有 Mover.Stop/FacePlayer/UseChaseSpeed/WalkRandom、也不再 SetPhase。
每个 AI 状态只声明触发哪个能力 id,行为(移动/朝向/停/速度/动画/伤害/
阶段声明)全部下沉到对应能力里。
- 新增 IdleAbility/PatrolAbility/AlertAbility:待机静止、巡逻游走、
警觉朝向玩家,各自 SetAiPhase 驱动阶段动画。
- ContactChaseAbility 追击进入时自设 RunSpeed + Chase 阶段(原在 AI)。
- PerceptionStateMachine 改为 AddAbilityState:进入/每帧 EnsureAbility
(被打断/受击后自动重触发)、离开 InterruptAbilities;转换规则不变。
- IEnemyActor/EnemyBrainContext 移除已无用的 SetPhase,保留 HasAlertState。
- 新增 SO:ABL_E001_Idle(e001_idle)、ABL_E001_Patrol(e001_patrol)。
- 脚手架 PlaceE001 与 ENM_CaoZhi 预制体同步为四能力结构;TestRoomA
实例替换为规范预制体实例。
PlayMode 验证:Chase→ContactChaseAbility、脱离感知→Move_Patrol→
PatrolAbility,阶段由能力设置,无报错。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 10:05:14 +08:00
joywayer and Claude Opus 4.8
790595d8de
fix(scaffold): 碰撞体底部对齐 y=0(原点=脚底) 修正 NavAgent 有效位置 + 追击改回nav
...
根因: NavAgent 用 transform 原点(0,0)判定是否在导航段上,而脚手架 CreateBodyCollider
未设 offset(碰撞体居中,底部在-size.y/2),站到地面时原点悬在导航线上方→HasValidPosition=False。
修复: AlignColliderBottomToPivot 让所有身体/HurtBox/HitBox 碰撞体底部对齐 y=0(通用规则,
角色/敌人/Boss 同理);同步修 E001 prefab 碰撞体 offset。验证: 敌人落地后 navValid=True(自动)。
追击能力改回 nav 寻路(MoveTo),不再直接移动。
注: 导航路径"跟随"仍有既有集成问题(UpdatePath 后 agent 不跟随可达路径),需另行排查。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-09 16:22:54 +08:00
joywayer and Claude Opus 4.8
d0f69b0599
fix(ai): E001 追击真正移动+攻击——直接水平爬行 + prefab 补挂 EnemyAiBrain
...
追击移动从 A* 寻路(MoveTo)改为直接朝玩家水平爬行(MoveInDirectionWithSpeed):
地面爬行怪不需寻路,且不依赖场景 NavGraph 烘焙(PathBerserker2d 在测试场景失效)。
ENM_CaoZhi prefab 补挂 EnemyAiBrain(_definitionId=E001),使对象池/prefab 生成的敌人也有AI
(此前只有脚手架场景实例有brain)。PlayMode 验证:敌人爬向玩家并接触伤害击杀。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-09 15:48:50 +08:00
joywayer and Claude 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
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
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