feat(skill): 优化技能碰撞检测逻辑并添加移动数据组件

- 新增 StimeDataComp 组件用于存储技能移动相关数据
- 修改 SMoveSystem 中距离结束和碰撞结束时的销毁逻辑,增加关闭碰撞体操作
- 重构 SkillView 的碰撞检测启用逻辑,提取为 enable_collider_safely 方法确保安全性
- 修复攻击帧事件中碰撞检测的启用条件,避免无效操作
This commit is contained in:
walkpan
2026-03-15 23:02:24 +08:00
parent ad9799d938
commit 9c21ab748e
4 changed files with 44 additions and 7 deletions

View File

@@ -136,7 +136,11 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
// 检查移动完成
if (moveComp.isCompleted && moveComp.autoDestroy) {
// 根据结束类型决定是否销毁
if (moveComp.endType === EType.timeEnd || moveComp.endType === EType.collision) {
if (
moveComp.endType === EType.distanceEnd ||
moveComp.endType === EType.collision
) {
skillView.close_collider();
entity.destroy();
}
}
@@ -229,4 +233,4 @@ export class SMoveHelper {
moveComp.stopMove();
}
}
}
}