Commit Graph
31 Commits
Author SHA1 Message Date
joywayerandClaude Opus 4.8 f143efe4a3 feat(scaffold): PlaceE001 挂载 EnemyLocomotion,重生成 prefab
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 12:10:29 +08:00
joywayerandClaude 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
joywayerandClaude 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
joywayerandClaude 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
joywayerandClaude Opus 4.8 150fadb72e fix(content): E001 能力/prefab 对齐设计——技能无CD、伪装期不伤人
ABL_E001_Chase/Alert cooldown 1.5→0(设计:E001无主动技能CD,再入感知立即追击);
ENM_CaoZhi prefab 与脚手架 PlaceE001 的 BodyContactDamage 初始禁用(伪装期不伤人,
追击期由 e001_chase 能力开启)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:52:03 +08:00
joywayerandClaude Opus 4.8 decd5503fb fix(scaffold): 修复敌人感知 los 槽位——检测层 Nothing→Player、半径 0→8
原 SetupPerceptionSystemSlots 把 los 槽 detectLayer 置 0(Nothing)且 radius=0,
导致视线永远探不到玩家;改为 Player 层 + 半径 8,LOS 检测恢复正常。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:26:40 +08:00
joywayer d38c6e35bb feat(ai): 脚手架 PlaceE001 一键挂载 EnemyAiBrain 并绑定 id=E001 2026-07-03 16:08:32 +08:00
joywayerandClaude Fable 5 5ccab35948 feat(world): 检查点复活位置由 RespawnPoint 子节点显式配置
CheckpointMarker 新增 _respawnPoint 引用,注册的检查点位置改为
该子节点的位置——触发区与出生点解耦,触发区可横跨通道、出生点
精确落在安全平台上。漏配时 Awake 显式报错且不注册(不以标记
自身位置兜底)。Gizmos 增画复活点(青色)与触发区连线,漏配
画红叉警示。PlaceCheckpointMarker 脚手架自动创建并绑定
RespawnPoint 子节点。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 11:26:02 +08:00
joywayerandClaude Fable 5 64822595b3 fix(player): 补挂 CheckpointRespawnHandler——存活回检查点链路接通
PlacePlayer 脚手架新增 CheckpointRespawnHandler 并自动绑定
EVT_CheckpointRespawn/EVT_FadeOutRequest/EVT_FadeInRequest;
Player.prefab 同步补挂修正。此前 LethalTrap 存活路径 Raise 的
EVT_CheckpointRespawn 无任何监听者,玩家不会被传送回检查点。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 11:04:33 +08:00
joywayer 9e7b513e60 删除旧生成的截图 2026-06-11 13:28:04 +08:00
joywayer a1f54b68e6 Refactor interaction prompt system to use world space prompts
- Removed the InteractPromptWidget from HUD and its references in HUDController.
- Introduced IInteractPromptView interface for world space interaction prompts.
- Implemented WorldInteractPrompt class to manage display of interaction prompts in world space.
- Updated InteractableDetector to handle showing/hiding of world space prompts based on player proximity to interactable objects.
- Created a new prefab for UI_WorldInteractPrompt to facilitate the new interaction prompt system.
2026-06-10 14:14:08 +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 1897658a00 UI系统 2026-06-07 11:49:55 +08:00
joywayer fe4fd60083 地图系统 2026-06-05 18:41:33 +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 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 68d4c699ae 修复内容:
PlayerMovement:新增 _facingLocked 字段 + LockFacing(bool) 方法;UpdateFacing() 锁定时直接返回
WallSlideState:OnStateEnter 调用 LockFacing(true) + FlipFacing(_wallDir);OnStateExit 调用 LockFacing(false) 解锁
WallJumpState:OnStateEnter 保险性再调一次 LockFacing(false);WallJumpAway/Toward 同步写入 _inputVelocityX,确保解锁后 UpdateFacing 朝向正确(背墙跳 = 离墙方向,对墙跳 = 朝墙方向)
2026-05-22 10:48:52 +08:00
joywayer 247a218182 实现移动平台乘客接口,优化乘客跟随逻辑 2026-05-21 17:09:06 +08:00
joywayer 67e2d3a8ff 单向平台 2026-05-21 11:44:01 +08:00
joywayer d09bc95c3f Refactor event channels and update layer specifications
- Removed StatusEffectEventChannelSO and its associated meta file.
- Updated CreateEventChannelAssets to handle new shield-related events.
- Added CharmModule for managing charm assets in the DataHub.
- Introduced CharmEventChannelSO for charm equipped/unequipped events.
- Changed layer references from "Ground" to "Platform" in various scripts.
- Updated documentation to reflect changes in layer specifications.
- Created new event assets for ShieldBroken, ShieldRestored, StatusEffectApplied, and StatusEffectExpired.
2026-05-21 11:08:14 +08:00
joywayer 280c7b22f5 PlacePlayer 2026-05-21 09:36:09 +08:00
joywayer d9bda9daa5 feat: 增强场景工具,添加检查点服务和主摄像机音频监听器引用,优化事件处理逻辑 2026-05-20 18:52:57 +08:00
joywayer aac24d825f 调整linkdoor 2026-05-19 16:04:40 +08:00
joywayer 0559d2cd36 linkdoor 2026-05-19 15:30:27 +08:00
joywayer 2dcb7a961a 角色能力,存档 2026-05-19 11:50:21 +08:00
joywayer d25f237e76 摄像机区域的优化 2026-05-17 07:56:12 +08:00
joywayer f264329751 摄像机区域的架构改动 2026-05-15 14:47:24 +08:00