英雄技能相关字段修改

This commit is contained in:
walkpan
2025-02-02 20:58:25 +08:00
parent 215fcd3a76
commit 2e53786aa0
24 changed files with 143 additions and 840 deletions

View File

@@ -8,7 +8,7 @@ const { ccclass, property } = _decorator;
export class debuff extends Component {
base: timedCom = null
hero:HeroViewComp = null
cd: number = 0
deff_cd: number = 0
ap: number = 0
start() {
this.base =this.node.getComponent(timedCom)
@@ -18,15 +18,15 @@ export class debuff extends Component {
update(deltaTime: number) {
if(smc.mission.pause) return
this.cd += deltaTime
if(this.cd >=1){
this.deff_cd += deltaTime
if(this.deff_cd >=1){
// this.node.setPosition(v3(-1000,0,0))
if(this.hero){
this.hero.in_atked()
this.hero.hp_less(Math.ceil(this.base.ap/this.base.time))
console.log("debuff 总扣血:"+this.base.ap+" 每秒: "+Math.ceil(this.base.ap/this.base.time))
}
this.cd=0
this.deff_cd=0
}
}
}