From db026e990d7c61544273d4752805ff3ef4f2ce13 Mon Sep 17 00:00:00 2001 From: panw Date: Thu, 17 Jul 2025 10:09:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E4=BD=93=E6=8A=80=E8=83=BD=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E9=9C=80=E8=A6=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/game/skills/arrow_blue.prefab | 6 ++--- .../resources/game/skills/arrow_yellow.prefab | 6 ++--- assets/resources/game/skills/base_ft.prefab | 6 ++--- assets/resources/game/skills/base_mg.prefab | 6 ++--- assets/resources/game/skills/base_sf.prefab | 6 ++--- assets/resources/game/skills/bwind.prefab | 10 +++---- assets/script/game/hero/SkillConComp.ts | 26 +++++-------------- 7 files changed, 26 insertions(+), 40 deletions(-) diff --git a/assets/resources/game/skills/arrow_blue.prefab b/assets/resources/game/skills/arrow_blue.prefab index faeec096..91b86d76 100644 --- a/assets/resources/game/skills/arrow_blue.prefab +++ b/assets/resources/game/skills/arrow_blue.prefab @@ -106,8 +106,8 @@ "__type__": "cc.Quat", "x": 0, "y": 0, - "z": 0, - "w": 1 + "z": 0.7071067811865475, + "w": 0.7071067811865476 }, "_lscale": { "__type__": "cc.Vec3", @@ -121,7 +121,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 0 + "z": 90 }, "_id": "" }, diff --git a/assets/resources/game/skills/arrow_yellow.prefab b/assets/resources/game/skills/arrow_yellow.prefab index e4e1cb23..4d301172 100644 --- a/assets/resources/game/skills/arrow_yellow.prefab +++ b/assets/resources/game/skills/arrow_yellow.prefab @@ -106,8 +106,8 @@ "__type__": "cc.Quat", "x": 0, "y": 0, - "z": 0.7071067811865475, - "w": 0.7071067811865476 + "z": 1, + "w": 6.123233995736766e-17 }, "_lscale": { "__type__": "cc.Vec3", @@ -121,7 +121,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 90 + "z": 180 }, "_id": "" }, diff --git a/assets/resources/game/skills/base_ft.prefab b/assets/resources/game/skills/base_ft.prefab index 4b95446c..920f3d4c 100644 --- a/assets/resources/game/skills/base_ft.prefab +++ b/assets/resources/game/skills/base_ft.prefab @@ -103,8 +103,8 @@ "__type__": "cc.Quat", "x": 0, "y": 0, - "z": 0, - "w": 1 + "z": 0.7071067811865475, + "w": 0.7071067811865476 }, "_lscale": { "__type__": "cc.Vec3", @@ -118,7 +118,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 0 + "z": 90 }, "_id": "" }, diff --git a/assets/resources/game/skills/base_mg.prefab b/assets/resources/game/skills/base_mg.prefab index 80ba0d5c..991ffdc3 100644 --- a/assets/resources/game/skills/base_mg.prefab +++ b/assets/resources/game/skills/base_mg.prefab @@ -103,8 +103,8 @@ "__type__": "cc.Quat", "x": 0, "y": 0, - "z": 0, - "w": 1 + "z": 0.7071067811865475, + "w": 0.7071067811865476 }, "_lscale": { "__type__": "cc.Vec3", @@ -118,7 +118,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 0 + "z": 90 }, "_id": "" }, diff --git a/assets/resources/game/skills/base_sf.prefab b/assets/resources/game/skills/base_sf.prefab index b406c953..1d1ef0e0 100644 --- a/assets/resources/game/skills/base_sf.prefab +++ b/assets/resources/game/skills/base_sf.prefab @@ -103,8 +103,8 @@ "__type__": "cc.Quat", "x": 0, "y": 0, - "z": 0, - "w": 1 + "z": 0.7071067811865475, + "w": 0.7071067811865476 }, "_lscale": { "__type__": "cc.Vec3", @@ -118,7 +118,7 @@ "__type__": "cc.Vec3", "x": 0, "y": 0, - "z": 0 + "z": 90 }, "_id": "" }, diff --git a/assets/resources/game/skills/bwind.prefab b/assets/resources/game/skills/bwind.prefab index b451caa4..b15b2ecb 100644 --- a/assets/resources/game/skills/bwind.prefab +++ b/assets/resources/game/skills/bwind.prefab @@ -268,10 +268,10 @@ }, "speed": 600, "controlPointSide": 1, - "controlPointOffset": 0.5, - "controlPointRandomness": 0.3, - "autoRotate": true, - "showTrajectory": true, + "controlPointOffset": 0, + "controlPointRandomness": 0, + "autoRotate": false, + "showTrajectory": false, "trajectoryColor": { "__type__": "cc.Color", "r": 0, @@ -281,7 +281,7 @@ }, "trajectoryWidth": 3, "easing": "linear", - "rotationSmoothness": 0.6, + "rotationSmoothness": 0, "_id": "" }, { diff --git a/assets/script/game/hero/SkillConComp.ts b/assets/script/game/hero/SkillConComp.ts index 0649382d..dc92ab5b 100644 --- a/assets/script/game/hero/SkillConComp.ts +++ b/assets/script/game/hero/SkillConComp.ts @@ -28,7 +28,7 @@ export class SkillConComp extends CCComp { private aoe_timers: Map = new Map(); // 每个技能的独立计时器 private readonly AOE_INTERVAL: number = 0.4; // 执行间隔,单位秒 private skill_id_counter: number = 0; // 技能ID计数器 - aoe_target_pos:Vec3=new Vec3(180,0,0) + aoe_target_pos:Vec3=new Vec3(180,40,0) init(): void { @@ -137,7 +137,7 @@ export class SkillConComp extends CCComp { target = this.node.position break case TGroup.Team: //所有友方 - target = this.selectTeamFront() + target = this.node.position break case TGroup.All: //所有单位 @@ -215,25 +215,11 @@ export class SkillConComp extends CCComp { pos=v3(this.get_front(entities)) return pos } - private selectTeamFront(){ - let pos=this.node.position - let entities=null - if(this.HeroView.fac==FacSet.HERO){ - entities=ecs.query(ecs.allOf(HeroModelComp)) - }else{ - entities=ecs.query(ecs.allOf(MonModelComp)) - } - if(entities.length==0){ - return pos - } - let keyPos = this.HeroView.fac==FacSet.HERO ? - Math.max(...entities.map(e => e.get(HeroViewComp).node.position.x)) : - Math.min(...entities.map(e => e.get(HeroViewComp).node.position.x)); - return v3(keyPos,20) - } + private selectAllyTargets( ): Vec3 { // 敌方最前排是x坐标最大的+50,我方最前排是x坐标最小的+50,若目标不存在,敌人 取320/2,我方取-320/2 - let kp=0 + let kp=50 + if(this.HeroView.fac==FacSet.MON) kp=0 let pos=v3(0,0) let entities=this.check_target() if(entities.length==0){ @@ -243,7 +229,7 @@ export class SkillConComp extends CCComp { return v3(-320/2-kp,0) } } - pos=v3(this.get_front(entities)+kp,0) + pos=v3(this.get_front(entities).x+kp,this.get_front(entities).y-BoxSet.ATK_Y,0) return pos }