This commit is contained in:
2025-06-11 23:55:45 +08:00
parent d06d8fe910
commit a0bd1da1ca
26 changed files with 613 additions and 1430 deletions

View File

@@ -80,14 +80,17 @@ export class SkillConComp extends CCComp {
const skillEntity = ecs.getEntity<Skill>(Skill);
const targets = this.selectEnemyTargets(config);
if (targets.length === 0) return;
skillEntity.load(
new Vec3(this.HeroView.node.position.x, this.HeroView.node.position.y+BoxSet.ATK_Y, 0), // 起始位置
this.HeroView.box_group, // 阵营
this.node.parent, // 父节点
config.uuid, // 技能ID
new Vec3(targets[0]?.get(HeroViewComp).node.position.x, targets[0]?.get(HeroViewComp).node.position.y, 0), // 目标位置
this.HeroView
);
this.scheduleOnce(()=>{
if(targets.length<=0||!this.HeroView) return
skillEntity.load(
new Vec3(this.HeroView.node.position.x+BoxSet.ATK_X*this.HeroView.scale, this.HeroView.node.position.y+BoxSet.ATK_Y, 0), // 起始位置
this.HeroView.box_group, // 阵营
this.node.parent, // 父节点
config.uuid, // 技能ID
new Vec3(targets[0]?.get(HeroViewComp).node.position.x, targets[0]?.get(HeroViewComp).node.position.y, 0), // 目标位置
this.HeroView
);
},0.3)
// console.log("技能:"+config.uuid+"=>"+targets[0]?.get(HeroViewComp).hero_name);
}