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
d7be0cc119
@
...
feat(ai): 追击冲刺带冷却——CD 期巡逻,冷却结束仍在追逐区则再冲(PatrolBetweenChases)
按需求:冲刺打完 → CD 期切到巡逻(Move_Patrol) → 冷却结束且玩家仍在追逐区 → 再冲刺。
PerceptionStateMachine 加 opt-in 开关 PatrolBetweenChases:
- Chase → Patrol When !IsAbilityRunning(chase):冲刺是 committed 冲锋,感知丢失
也不中途打断,打完(能力结束)即降巡逻。
- Idle/Patrol/Alert → Chase 加冷却门 CanUseAbility(chase):CD 中不回追击,
避免"CD 期在追逐区每帧 Chase↔Patrol 来回抖"(用户担心的错切/抖动)。
- 默认关:不影响其他敌人(leftAllZones 旧行为保留)。
E001CaoZhiAi 打开开关。追击能力保持单次冲刺不变,冷却=ABL_E001_Chase.cooldown(1s)。
测试:PerceptionStateMachineTests +5(CD 转换矩阵含"CD 期多帧不抖动"负例),
FakeCombat 加可控 CanUse。全量 75/75 绿。PlayMode 实测循环
Move_Patrol(CD)→Chase(冲)→Move_Patrol,inChase 全程 true 亦不抖,0 报错。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-20 13:11:28 +08:00
joywayer
1a15473966
@
...
fix(enemy): 转身中不再静默丢弃新朝向请求,修"冲刺方向与朝向相反"
UpdateFacing 原 `if (_isTurning) return` 会把转身进行中的新朝向请求静默丢弃。
当敌人在平台边缘触发 Pace 翻转(开始 Flip 转身)同时进入追击时,追击的
FaceDirection(朝玩家)被丢弃,旧的巡逻转身完成后朝向定格在与玩家相反方向
→ 冲刺朝玩家方向移动、脸却朝相反(并连带"冲刺中途转身""提前停"两个衍生现象)。
改为:转身中收到不同方向请求时重定向(停旧转身按新方向重起),同向则忽略。
根因修复,惠及 Pace/追击/FaceTarget 所有调用方。
systematic-debugging 确定性复现证实:修复前 AFTER-TURN dir=+1 facing=-1;
修复后开阔地冲刺全程 dir=1 facing=1、冲满 6 米到真实平台边缘才停。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-20 13:03:29 +08:00
joywayer
bd8e0a4f16
@
...
refactor(enemy): _wallMask 未配显式报错,不再静默回退地面层
按 CLAUDE.md §6:删除"_wallMask 为空则回退 _groundMask"的下游兜底(掩盖漏配)。
改为:WouldHitWallAhead/WallAndLedgeCheck 直接用 _wallMask;Awake 校验——启用
墙检测(_wallCheckDist>0)却 _wallMask=Nothing 时 Debug.LogError 提醒策划配置
(推荐 Platform+Wall)。
PlayMode 验证:E001(已配 Platform+Wall)无报错、撞墙检测正常;临时配错的敌人
(wallMask=Nothing) Awake 即报明确错误。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-20 10:36:11 +08:00
joywayer
88fca8f9b0
@
...
fix(enemy): 撞墙检测层默认 Platform+Wall(策划可配) + 修 Physics2D 层矩阵落盘
- EnemyMovement._wallMask:本就 [SerializeField] 暴露在 Inspector,补 Tooltip
说明为策划可配的撞墙检测层(巡逻翻边/追击冲刺共用,按碰撞体前缘);脚手架
PlaceE001 默认赋 Platform+Wall,prefab 同步。原先 Nothing→回退 groundMask,
漏检 Wall 层墙;现显式含 Wall。回退逻辑保留作未配置兜底。
- Physics2DLayerReport.SavePhysicsSettings:原实现(AssetDatabase.SaveAssets+
改 defaultContactOffset)不落盘层矩阵——实测 Physics2D.IgnoreLayerCollision 的
改动 SaveToSerializedFileAndForget(单例) 也捕获不到;改用 File/Save Project
(实测 hash 变化确认落盘,且不触动打开场景)。Auto Fix 的矩阵修正现能立即持久化。
(说明:Enemy×Player 碰撞矩阵与报告 ExpectedPairs 此前已正确=忽略,无需改动;
地图障碍物层管理/冲刺可穿透障碍另行整体规划。)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-20 10:32:07 +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
f1ca62f881
@
...
feat(enemy): 追击(nav)也夹紧悬崖边缘——碰撞体前缘不越地形边缘
MoveWithSpeed(导航跟段驱动追击)原先无边缘夹紧,仅靠 nav 图,agent 按点定位
可让碰撞体前缘越出段/地形边缘约半个碰撞体宽。现加"悬崖"夹紧(WouldFallAhead,
按碰撞体前缘即时判定),贴地生效:追击时碰撞体边缘停在地形边缘、不越界,与 Pace
一致。只夹悬崖不夹墙(墙交寻路绕行,免误夹停);跨沟的 nav-link 跳/落不经
MoveWithSpeed(仅 IsMovingOnSegment 时写速度),故不影响跳跃/下落过沟。
WouldBlockAhead 拆为 WouldHitWallAhead / WouldFallAhead 复用;PlayMode 校验
拆分正确(前缘朝悬崖侧 WouldFall=True)、Pace 不回归。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 15:48:58 +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
joywayer
6f52e4ff81
@
...
fix(enemy): Pace 巡逻改边沿触发翻向,修边缘左右抖动
TickPatrol 跑在 Update(可变帧率),IsWallAhead/IsLedgeAhead 在 FixedUpdate
刷新。原电平触发(每帧 blocked 就翻向)会在检测刷新前的多个 Update 帧把同一
障碍连翻多次→掉头边缘左右抖动几次才正常。改为边沿触发(仅障碍首次出现时翻
一次),用 _paceBlockedPrev 记录上帧状态。PlayMode 验证:踱步移动正常、无
连续快速翻转。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 14:36:53 +08:00
joywayer and Claude 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
joywayer and Claude Opus 4.8
c43ca8e8b6
feat(enemy): EnemyLocomotion 巡逻策略 Pace(踱步) + Waypoints(路点 loop/ping-pong)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 13:47:14 +08:00
joywayer and Claude 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
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
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
joywayer
087aa96ca6
@
...
fix(ai): EnemyAiBrain 在 Start 构造 runtime,修入口态 locomotion NRE
入口状态 OnEnter 会声明 locomotion 意图(x.Locomotion.SetMode),但原在 Awake
构造 AiRuntime 时 EnterInitial 立即触发该 OnEnter——此时 EnemyBase.Awake 可能
尚未发现 _locomotion(两组件 Awake 顺序未定),导致 x.Locomotion 为 null 抛 NRE,
brain 未建成 runtime。改在 Start 构造(所有 Awake 先于任一 Start),保证依赖就绪。
根因修复,非 null 兜底。P3 PlayMode 验证发现。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 13:30:46 +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
0f0112eb91
refactor(ai): PerceptionStateMachine 状态改绑 locomotion 意图
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 12:17:49 +08:00
joywayer and Claude Opus 4.8
1ab0521061
refactor(ai): IAiContext.Mover→Locomotion,删除 IMover
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 12:14:53 +08:00
joywayer and Claude 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
joywayer and Claude Opus 4.8
0f988c4cef
feat(enemy): 新增 EnemyLocomotion 执行器(Idle/Patrol-Wander/Face/Approach)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-10 11:59:02 +08:00
joywayer
e894a9dd27
@
...
chore(ai): 移除死代码 Behavior Designer(BD_* + Opsive 包 + 宏)
敌人 AI 已迁到自研 BrainGraph,旧的 Opsive Behavior Designer 集成全线死亡:
无任何 prefab 挂 BehaviorTree,新系统也不引用 BD 任务。用户手动删除三个
com.opsive.* 包后,BD_* 文件(#if GRAPH_DESIGNER 下引用 Opsive 类型)导致
BaseGames.Enemies.AI 程序集编译失败——本提交清除死代码并恢复编译。
- 删除 ~50 个 BD_*.cs + BDTaskAttributes.cs + BaseGames.Enemies.AI.asmdef。
- 移除 Standalone 的 GRAPH_DESIGNER 脚本宏。
- 移除 com.opsive.behaviordesigner/shared/graphdesigner 嵌入包(用户已删目录)。
已扫描确认无其他程序集引用该 AI 程序集、无真实 Opsive/BD_ 类型引用
(仅注释/Tooltip 提及)。编译 0 错误。属敌人架构重构 P1(死代码清除)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
@
2026-07-10 11:37:16 +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
490329e1dc
refactor(nav): 敌人移动改为物理原生架构——根治 TBM 与 Dynamic 刚体冲突
...
根因: NavAgent.Position setter 直接写 transform.position, TBM 段移动每帧写它, 与敌人
Dynamic 刚体(重力/碰撞)冲突(旧代码靠"NavDriving清零velocity"缓解,但对Dynamic刚体直接
写transform.position本就不推荐,易卡墙/穿透/被物理覆盖)。
根本解: 寻路降为"顾问"(只给方向),移动执行归物理:
- EnemyNavAgent.Awake 禁用 TBM.SegmentMovement(不再写 transform.position);
- FixedUpdate 改物理原生桥: 朝 PathSubGoal 写 MoveDir+MoveSpeed 由 EnemyMovement 施加
velocity+重力执行, 到达子目标时 CompleteSegmentTraversal 推进段(原由TBM负责);
- EnemyMovement 撤掉 NavDriving 的清零velocity/只朝向门, nav方向统一走velocity移动。
保留击退/击飞/落地等全部物理反馈。
附带修 PerceptionStateMachine: 追击维持改"追逐区 OR 视野区"任一(视野los可能被墙挡漏检,
仅靠视野会导致玩家在近身追逐区内却Chase↔Patrol抖动、nav被反复Stop不移动)。
PlayMode 验证: 敌人 nav 巡逻/追击均用velocity移动(FollowPath/onSeg=True)、追击稳定无抖动。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-09 17:19:01 +08:00
joywayer and Claude Opus 4.8
643f63c737
fix(nav): 修复 nav 寻路核心用法——重寻路防抖 + allowCloseEnoughPath
...
根因1: PathBerserker2d NavAgent.UpdatePath 明确禁止每帧调用(路径计算跨帧,每帧重启则永不完成、
agent永不移动),而追击每帧 MoveTo→RequestMoveTo→UpdatePath。修: EnemyNavAgent.RequestMoveTo
加防抖(目标位移阈值0.5m + 最小间隔0.25s),让路径算完并跟随;StopNavigation 复位。
根因2: NavAgent.allowCloseEnoughPath 默认false→追击玩家(常不在导航段上)寻路直接失败。
修: 脚手架(4个PlaceExxx)+E001 prefab 设为 true(寻路到最近可达点)。
验证: 敌人 nav 巡逻/追击已能真正跟随路径移动(following=True)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-09 16:43:52 +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 and Claude Opus 4.8
4ce798ea6e
refactor(ai): E001 AI 重写为纯决策层,符合设计并委托能力模块
...
依据小怪设计文档重构 E001 状态机 Idle_Disguise→Skill_Start→Skill_Loop→Skill_End→Move_Patrol:
追击移动/接触伤害全部委托 e001_chase(ContactChaseAbility),AI 不再裸 MoveTo。
新增 ISensor.DetectsPlayer(视线OR近身,对齐设计)、IMover.UseChase/PatrolSpeed、
IEnemyActor.SetPhase(AI 声明阶段、EnemyBase 播动画)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-03 16:51:47 +08:00
joywayer and Claude 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
joywayer
a9acace0a0
feat(ai): E001(草蛭) AiScript 定义——巡逻/追击/搜查(接触伤害杂兵)
2026-07-03 15:03:27 +08:00
joywayer
4994360927
feat(ai): EnemyAiBrain 组件——承载 AiRuntime、逐帧推进、池复用重置、信号入口
2026-07-03 15:00:59 +08:00
joywayer
20c2568222
feat(ai): EnemyBrainContext——EnemyBase子系统适配为BrainGraph能力接口
2026-07-03 14:58:52 +08:00
joywayer and Claude Fable 5
09bdda970a
feat(feedback): 命中/受击反馈支持固定位置与击中位置两种生成模式
...
DamageInfo 新增运行时字段 HitPoint:HitBox 结算时写入精确接触点
(ClosestPoint),HurtBox.ReceiveDamage 以解析后命中点兜底盖戳,
陷阱/环境等直调路径同样可用。IFeedbackPlayer.PlayHit/PlayTakeHit
增加命中点参数,全链路(武器实例→PlayerCombat→HurtState→
EnemyFeedback)透传。各 Feedback 组件命中/受击槽位新增
FeedbackPositionMode(Fixed=反馈链编排的固定位置 /
HitPoint=传入命中点,启用位置选项的模块在该点生成),由编排
反馈链的开发者在 Inspector 按表现选择;武器命中默认 HitPoint
(火花贴点),角色级默认 Fixed(震屏/振动与位置无关)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-06-12 11:48:37 +08:00
joywayer and Claude Opus 4.8
cc046c53b3
fix(combat): HitBox 命中节奏统一 + 投射物穿透可配
...
HitBox 新增 HitMode Single/Interval:Interval 用 Enter/Exit 跟踪占用 + Update 轮询,对停留目标按间隔重判,不再依赖 OnTriggerEnter 单次语义。BodyContactDamage 改用 Interval 模式,修复停留在接触判定内、无敌结束后不再受伤的 bug;FlyingEnemy 接触伤害加按目标间隔节流。ProjectileConfigSO 新增 MaxHits 默认 1 即命中即消失,Projectile 按命中预算回收,修掉默认无限穿透;弹反守卫避免反射后立即回收。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-11 16:31:55 +08:00
joywayer and Claude 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
247de307c6
UI 系统
2026-06-08 16:05:00 +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
520f84999b
Add enemy respawner and related components for room lifecycle management
...
- Implemented EnemyRespawner to manage enemy spawning and respawning within rooms.
- Added IRoomLifecycle interface for room activation and dormancy handling.
- Created supporting classes and metadata for enemy perception and threat assessment.
- Established streaming system components for room state management and transitions.
- Added necessary metadata files for new scripts to ensure proper integration with Unity.
2026-05-23 21:23:09 +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
b7baf7ad6a
Add WeaponFeedback component and AddressableManagerWindow meta file
...
- Implemented WeaponFeedback class for handling weapon-related feedbacks such as hit effects and attack sounds.
- Added meta file for AddressableManagerWindow to manage addressable assets.
- Included a new jump.data file for profiler data.
2026-05-22 22:03:32 +08:00