技能有bug 需要处理

This commit is contained in:
2025-08-12 11:02:16 +08:00
parent 1273ec6e99
commit 61cbd6e7bd
5 changed files with 382 additions and 505 deletions

View File

@@ -68,25 +68,7 @@ export class Skill extends ecs.Entity {
node.angle+=angle
// 添加技能组件
const SComp = node.getComponent(SkillCom); // 初始化技能参数
if (!SComp) {
console.error("[Skill] 技能组件获取失败");
return;
}
// 确保caster有必要的属性
if (typeof caster.ap === 'undefined') {
console.error("[Skill] caster.ap 未定义");
return;
}
if (typeof caster.box_group === 'undefined') {
console.error("[Skill] caster.box_group 未定义");
return;
}
// 只设置必要的运行时属性,配置信息通过 SkillSet[uuid] 访问
Object.assign(SComp, {
// 核心标识
@@ -94,7 +76,6 @@ export class Skill extends ecs.Entity {
// 位置和施法者信息
startPos: startPos,
targetPos: targetPos,
caster: caster,
group: caster.box_group,
fac: caster.fac,
// 技能数值