diff --git a/assets/resources/game/skill/atk/atk_s1.prefab b/assets/resources/game/skill/atk/atk_s1.prefab index 020a6ed9..f9a72537 100644 --- a/assets/resources/game/skill/atk/atk_s1.prefab +++ b/assets/resources/game/skill/atk/atk_s1.prefab @@ -32,10 +32,16 @@ }, { "__id__": 16 + }, + { + "__id__": 18 + }, + { + "__id__": 20 } ], "_prefab": { - "__id__": 18 + "__id__": 22 }, "_lpos": { "__type__": "cc.Vec3", @@ -356,6 +362,74 @@ "__type__": "cc.CompPrefabInfo", "fileId": "35nW0iQNBH2bqkWAr3MVkQ" }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "enabledContactListener": true, + "bullet": false, + "awakeOnLoad": true, + "_group": 1, + "_type": 0, + "_allowSleep": false, + "_gravityScale": 1, + "_linearDamping": 0, + "_angularDamping": 0, + "_linearVelocity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_angularVelocity": 0, + "_fixedRotation": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "57cr7S0YpK4oEZCavwXtIX" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": false, + "__prefab": { + "__id__": 21 + }, + "tag": 0, + "_group": 1, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_size": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ebw5mObxNGGKxnJXDgX5gl" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/skill/atk/m_water_ball_1.prefab b/assets/resources/game/skill/atk/m_water_ball_1.prefab index 63c4d6d9..c69d14b6 100644 --- a/assets/resources/game/skill/atk/m_water_ball_1.prefab +++ b/assets/resources/game/skill/atk/m_water_ball_1.prefab @@ -304,7 +304,7 @@ "bullet": false, "awakeOnLoad": true, "_group": 1, - "_type": 1, + "_type": 0, "_allowSleep": false, "_gravityScale": 1, "_linearDamping": 0, diff --git a/assets/script/game/hero/SACastSystem.ts b/assets/script/game/hero/SACastSystem.ts index 29ef7a20..cd89cf1b 100644 --- a/assets/script/game/hero/SACastSystem.ts +++ b/assets/script/game/hero/SACastSystem.ts @@ -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;