技能设置清理
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { _decorator, Component, Node, ProgressBar, v3, Vec3 } from 'cc';
|
||||
import { HeroViewComp } from './HeroViewComp';
|
||||
import { BuffAttr, CdType, DTType, SKILL_CONST, SkillSet, SType, TGroup, TType } from '../common/config/SkillSet';
|
||||
import { BuffAttr,SKILL_CONST, SkillSet, SType, TGroup, } 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';
|
||||
@@ -41,15 +41,14 @@ export class SkillConComp extends CCComp {
|
||||
if(this.HeroView.DEBUFF_STUN <= 0&&this.HeroView.DEBUFF_FROST <= 0) {
|
||||
let skills=this.HeroView.skills
|
||||
for(let i=0;i<skills.length;i++){
|
||||
if(SkillSet[skills[i].uuid].CdType==CdType.cd) {
|
||||
skills[i].cd += dt;
|
||||
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
|
||||
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
|
||||
this.castSkill(SkillSet[skills[i].uuid])
|
||||
this.HeroView.skills[i].cd = 0
|
||||
}
|
||||
}
|
||||
skills[i].cd += dt;
|
||||
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
|
||||
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
|
||||
this.castSkill(SkillSet[skills[i].uuid])
|
||||
this.HeroView.skills[i].cd = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(skills[1]){
|
||||
if(this.HeroView.fac==FacSet.HERO) {
|
||||
|
||||
Reference in New Issue
Block a user