fix: 修正技能类型并添加碰撞组件

- 将m_water_ball_1.prefab的_type从1改为0
- 在SACastSystem.ts中修复目标返回逻辑
- 为atk_s1.prefab添加RigidBody2D和BoxCollider2D组件
This commit is contained in:
2025-11-02 00:23:53 +08:00
parent 8fdd9e2c98
commit b24f0e2afc
3 changed files with 78 additions and 4 deletions

View File

@@ -166,8 +166,8 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
// 这里可以调用 SkillConComp 的目标选择逻辑
// 暂时返回默认位置
if (caster==null ) return
if(caster.ent == null) return
if (caster == null) return targets;
if (caster.ent == null) return targets;
const heroAttrs = caster.ent.get(HeroAttrsComp);
const fac = heroAttrs?.fac ?? 0;
const defaultX = fac === 0 ? 400 : -400;