From 8113ec671ff5c95d9205bf0ae6694cdb8d0feab7 Mon Sep 17 00:00:00 2001 From: panw Date: Thu, 20 Nov 2025 15:11:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8A=80=E8=83=BD=E7=B3=BB=E7=BB=9F):?= =?UTF-8?q?=20=E7=BB=9F=E4=B8=80=E9=A2=9D=E5=A4=96=E4=BC=A4=E5=AE=B3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=91=BD=E5=90=8D=E4=BB=8Eexr=5Fdmg=E6=94=B9?= =?UTF-8?q?=E4=B8=BAext=5Fdmg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改Skill.ts和SACastSystem.ts中的参数命名,保持代码一致性 --- assets/script/game/hero/SACastSystem.ts | 5 ++--- assets/script/game/skill/Skill.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/script/game/hero/SACastSystem.ts b/assets/script/game/hero/SACastSystem.ts index faf19f9a..3066009f 100644 --- a/assets/script/game/hero/SACastSystem.ts +++ b/assets/script/game/hero/SACastSystem.ts @@ -190,7 +190,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat /** * 创建技能实体 */ - private createSkill(s_uuid: number, caster: HeroViewComp,targets:Vec3[]=[],exr_dmg:number=0) { + private createSkill(s_uuid: number, caster: HeroViewComp,targets:Vec3[]=[],ext_dmg:number=0) { // 检查节点有效性 if (!caster.node || !caster.node.isValid) { console.warn("[SACastSystem] 施法者节点无效"); @@ -215,8 +215,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat const targetPos = targets[0]; // 使用第一个目标位置 // console.log(`[SACastSystem]: ${s_uuid}, 起始位置: ${startPos}, 目标位置: ${targetPos}`); // 加载技能实体(包括预制体、组件初始化等) - skill.load(startPos, parent, s_uuid, targetPos, caster,exr_dmg); - + skill.load(startPos, parent, s_uuid, targetPos, caster,ext_dmg); } /** diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index 88571fc7..2b9f5c4e 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -29,7 +29,7 @@ export class Skill extends ecs.Entity { this.addComponents(SMoveDataComp); } load(startPos: Vec3, parent: Node, s_uuid: number, targetPos: Vec3, - caster:HeroViewComp,damage:number=0) { + caster:HeroViewComp,ext_dmg:number=0) { const config = SkillSet[s_uuid]; if (!config) {