refactor(技能系统): 统一额外伤害参数命名从exr_dmg改为ext_dmg
修改Skill.ts和SACastSystem.ts中的参数命名,保持代码一致性
This commit is contained in:
@@ -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) {
|
if (!caster.node || !caster.node.isValid) {
|
||||||
console.warn("[SACastSystem] 施法者节点无效");
|
console.warn("[SACastSystem] 施法者节点无效");
|
||||||
@@ -215,8 +215,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
|||||||
const targetPos = targets[0]; // 使用第一个目标位置
|
const targetPos = targets[0]; // 使用第一个目标位置
|
||||||
// console.log(`[SACastSystem]: ${s_uuid}, 起始位置: ${startPos}, 目标位置: ${targetPos}`);
|
// 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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class Skill extends ecs.Entity {
|
|||||||
this.addComponents<SMoveDataComp>(SMoveDataComp);
|
this.addComponents<SMoveDataComp>(SMoveDataComp);
|
||||||
}
|
}
|
||||||
load(startPos: Vec3, parent: Node, s_uuid: number, targetPos: Vec3,
|
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];
|
const config = SkillSet[s_uuid];
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
|
|||||||
Reference in New Issue
Block a user