dd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user