Commit Graph

11 Commits

Author SHA1 Message Date
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
1866f323e4 feat(combat): 投射物接入伤害目标层过滤,弹反阵营/目标同步翻转
HitBox 暴露 TargetLayers 运行时读写。Projectile 缓存预制体初始目标层并在 Initialize 还原(对象池复用不被上一发弹反污染);ReflectAsPlayerProjectile 时目标层随阵营翻转(PlayerHurtBox→EnemyHurtBox,保留可破坏物等其他位)。

ParryableProjectile 绕过 HitBox 自行判定,补上同样的目标层过滤;并修复其弹反分支不切 PlayerProjectile 层的问题——原先反射后仍留在 EnemyProjectile 层,碰撞矩阵 EnemyProjectile↔EnemyHurtBox 不碰撞,反射弹永远打不中敌人。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 10:34:43 +08:00
ef7ff63b67 feat(combat): HitBox 新增 _targetLayers 实例级伤害目标过滤
Physics2D 碰撞矩阵只决定哪些层之间产生 Trigger 事件(全局门),无法表达单个判定盒的伤害目标差异。新增 _targetLayers 掩码:事件发生后仅对配置层结算伤害,拼刀检测独立于该过滤;Enter 入口同步过滤,非目标不进入命中/占用跟踪。默认 Everything,存量资产行为不变。

ENM_CaoZhi 接触伤害盒按规范配置 _targetLayers=PlayerHurtBox(不误伤友军),并清掉误配为 Player 层的 _rivalHitBoxMask(身体接触不参与拼刀)。已实机验证收紧后接触伤害正常。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 10:15:27 +08:00
8515dfa7ab feat(combat): 下劈弹跳完善——可破坏物可弹跳+独立弹跳力+下劈保留空中操控
- HitBox 新增 OnBreakableHitConfirmed:命中 IBreakable 也发命中确认,
  下劈打可破坏物同样弹跳;不走 OnHitConfirmed,灵力仍只来自敌人
- 新增 PogoBounceForce 配置(默认 15,略低于 JumpForce=18)+
  PlayerMovement.PogoBounce(),弹跳高度独立可调、固定不可截断
- DownAttackState 增加 OnStateFixedUpdate:下劈期间保留完整空中
  水平操控(含与 FallState 同款贴墙保护)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 09:51:17 +08:00
8a0992c0e7 fix(combat): HitBox 懒初始化,修复 Activate 早于 Awake 致接触判定碰撞体被禁用
BodyContactDamage.OnEnable 在 HitBox.Awake 之前调用 Activate 时 _directColliders 尚未收集,Activate 对空列表启用碰撞体、随后 Awake 又禁用碰撞体,导致接触伤害判定盒永久收不到 Trigger 事件、玩家不受碰撞伤害。原 BodyContactDamage 靠 Update 周期 re-Activate 掩盖了该时序问题,移除该循环后暴露。

将碰撞体/代理/服务缓存收集抽到 EnsureInitialized 懒初始化,Awake 与 Activate 都先调用,与脚本执行顺序无关。已实机验证:进入 Play 后碰撞体自动启用,玩家正常受到碰撞伤害。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 16:56:42 +08:00
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
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
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
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
5fd981f5b9 完整启动流程 2026-05-19 23:20:44 +08:00
f264329751 摄像机区域的架构改动 2026-05-15 14:47:24 +08:00