英雄技能相关字段修改
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user