Commit Graph
43 Commits
Author SHA1 Message Date
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 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
joywayerandClaude 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
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 b582317692 UI 系统 2026-06-08 11:26:17 +08:00
joywayer 1897658a00 UI系统 2026-06-07 11:49:55 +08:00
joywayer d794b83ebe UI系统组件 2026-06-06 09:00:11 +08:00
joywayer fe4fd60083 地图系统 2026-06-05 18:41:33 +08:00
joywayer 613f2a4d13 feat: Enhance scene transition management and HUD scaffolding
- Added RequestTransition method to ISceneService for direct scene transition requests without needing Inspector SO references.
- Updated DoorTransition and RoomTransition to utilize the new RequestTransition method via ServiceLocator.
- Introduced SceneFadeController to manage scene fade effects during transitions, with event channel integration for fade requests.
- Created HUDScaffoldWizard to automate HUD Canvas setup, including various UI elements and event channel bindings.
- Updated assembly definitions to include necessary dependencies for new UI components.
- Added Streaming assets for budget configuration to optimize scene loading and memory management.
2026-06-03 08:08:27 +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 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 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 f096105caf 编辑器扩展优化 2026-05-20 19:55:11 +08:00
joywayer d9bda9daa5 feat: 增强场景工具,添加检查点服务和主摄像机音频监听器引用,优化事件处理逻辑 2026-05-20 18:52:57 +08:00
joywayerandCopilot 82ce9ff09a refactor(editor): reorganize Editor directory and unify menu hierarchy
File directory changes (mirror Scripts/ module structure):
- AbilityTypeDrawer.cs         → Equipment/
- CharacterWizardWindow.cs     → Character/
- FormEditorWindow.cs          → Player/
- GMToolWindow.cs              → Tools/
- SOManagerWindow.cs           → Tools/
- Map/MapRoomDataEditor.cs     → World/Map/
- Navigation/ (root)           → Enemies/Navigation/
- Achievements/                → Progression/

Menu hierarchy changes (BaseGames/ top-level):
- Data/: +Character Wizard (from Tools/), +Boss Skill Sequence (from Tools/)
- Addressables/: +Addressable Batch Tool, +Asset Reference Graph, +Validate Address Keys (from Tools/Verification/)
- Scene/Setup/: +Boot Flow Wizard, +Scaffold *, +Auto-Open Persistent (from Tools/)
- Scene/: +Camera Area Setup (from Camera/), +Bake All NavSurfaces (from Tools/)
- Events/: +Event Bus Monitor, +Event Chain Viewer, +Create/Reimport Event Channels (from Tools/)
- Tools/Validation/: +Validate All SOs, +Apply/Validate Script Order (from Tools/ flat)
- Tools/Maintenance/: +Missing Scripts/*, +Physics2D Layer Matrix/* (from Tools/ flat)

Result: BaseGames/Tools/ reduced from 16 flat items to 4 items + 2 submenus

Docs: update AssetFolderSpec §12 editor tool table with new menu paths

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-20 11:52:17 +08:00
joywayerandCopilot c88d2d0549 feat: Addressables rules/sync tools, UI fixes, AddressKeys update
- Add AddressableRules.cs: single source of truth for prefix->group and prefix->label rules
- Add AddressableRuleSyncWindow.cs: scan/fix/export-CSV tool (BaseGames > Addressables > Rule Sync)
- AddressableBatchTool.cs: delegate DeriveGroupName to AddressableRules, remove duplicate PrefixGroupMap
- AddressKeys.cs: add Labels constants (Preload, Poolable, Enemy, BGM, SFX, Charms, Config, Weapon)
- Docs/Standards/AddressablesLabelSpec.md: new label naming & assignment spec
- Docs/Standards/AssetFolderSpec.md: update Addressables group strategy section
- SplashScreenController.cs: fix MainMenu loading flow
- BootFlowSetupWizard.cs / SceneScaffoldTools.cs: scene scaffold fixes
- PlayerInputActions: set UI/Point to Pass-Through type
- Persistent.unity: add BootSequencer to auto-load MainMenu on play
- EditorBuildSettings.asset: register scenes for build

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-20 11:10:31 +08:00
joywayer 5fd981f5b9 完整启动流程 2026-05-19 23:20:44 +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