From 3d97da8271a83de17239f52ecc4067699b01fb99 Mon Sep 17 00:00:00 2001 From: panw Date: Mon, 30 Mar 2026 16:48:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=80=E8=83=BD):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=B4=9D=E5=A1=9E=E5=B0=94=E6=9B=B2=E7=BA=BF=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E5=B9=B6=E4=BF=AE=E5=A4=8D=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E7=9B=AE=E6=A0=87=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当技能类型为贝塞尔曲线时,直接使用最近敌人的位置作为目标位置,避免范围技能目标位置计算错误。同时将贝塞尔曲线的起始高度从18调整为25,以优化技能表现。 --- assets/script/game/hero/SCastSystem.ts | 5 ++++- assets/script/game/skill/SMoveComp.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index 002c3cef..ff3f1dfc 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -2,7 +2,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec import { Vec3 } from "cc"; import { HeroAttrsComp } from "./HeroAttrsComp"; import { HeroViewComp } from "./HeroViewComp"; -import { DTType, SkillConfig, SkillKind, SkillSet, SkillUpList, TGroup } from "../common/config/SkillSet"; +import { DTType, RType, SkillConfig, SkillKind, SkillSet, SkillUpList, TGroup } from "../common/config/SkillSet"; import { Skill } from "../skill/Skill"; import { smc } from "../common/SingletonModuleComp"; import { HType } from "../common/config/heroSet"; @@ -375,6 +375,9 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate * - 范围技能:优先前排敌人位置 */ private resolveEnemyCastTargetPos(config: SkillConfig, heroAttrs: HeroAttrsComp, heroView: HeroViewComp, nearestEnemy: HeroViewComp, maxRange: number): Vec3 | null { + if (config.RType === RType.bezier) { + return nearestEnemy.node?.position.clone() ?? null; + } if (config.DTType !== DTType.range) { return this.buildEnemyCastTargetPos(heroView, nearestEnemy, maxRange); } diff --git a/assets/script/game/skill/SMoveComp.ts b/assets/script/game/skill/SMoveComp.ts index f4ee9acc..30ae18ef 100644 --- a/assets/script/game/skill/SMoveComp.ts +++ b/assets/script/game/skill/SMoveComp.ts @@ -65,7 +65,7 @@ export class SMoveDataComp extends ecs.Comp { /** 贝塞尔曲线控制点 */ controlPoint: Vec3 = v3(0, 0, 0); - bezierStartHeight: number = 18; + bezierStartHeight: number = 25; bezierMidHeight: number = 140; bezierArc: number = 1;