aoe技能继续添加

This commit is contained in:
2025-06-20 16:29:11 +08:00
parent 211dd26ca3
commit 6ce9fc4c48
14 changed files with 178 additions and 226 deletions

View File

@@ -1,6 +1,6 @@
import { _decorator, Component, Node, Vec3 } from 'cc';
import { HeroViewComp } from './HeroViewComp';
import { SkillSet, TargetGroup, TargetType } from '../common/config/SkillSet';
import { SkillSet, TGroup, TType } from '../common/config/SkillSet';
import { Skill } from '../skills/Skill';
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { oops } from 'db://oops-framework/core/Oops';
@@ -100,25 +100,25 @@ export class SkillConComp extends CCComp {
return;
}
let targets:any=null
switch(config.TargetGroup){
case TargetGroup.Enemy: //单个敌人
switch(config.TGroup){
case TGroup.Enemy: //单个敌人
targets = this.filterFrontRow();
break
case TargetGroup.Ally: //所有敌人
case TGroup.Ally: //所有敌人
targets = this.selectAllyTargets();
break
case TargetGroup.Self: //自身
case TGroup.Self: //自身
targets = this.HeroView.ent
break
case TargetGroup.Team: //所有友方
case TGroup.Team: //所有友方
break
case TargetGroup.All: //所有单位
case TGroup.All: //所有单位
break
}
this.HeroView.playSkillEffect(config.uuid)
const skillEntity = ecs.getEntity<Skill>(Skill);
if (targets.length === 0) return;