hp buff 基本完成

This commit is contained in:
2025-06-25 21:09:54 +08:00
parent db0a0dd19c
commit 7363952dae
7 changed files with 62 additions and 73 deletions

View File

@@ -57,11 +57,7 @@ export class BarCompComp extends CCComp {
}
update_bar(){
if(!this.get_hero()) return
let hp_bar = this.hero_bar.getChildByName("hp").getChildByName("bar").getComponent(ProgressBar)
let ap_bar = this.hero_bar.getChildByName("ap").getChildByName("val").getComponent(Label)
let ap =this.hero.ap+"("+this.hero.ap_ur+")"
hp_bar.progress = this.hero.hp/this.hero.hp_max
ap_bar.string = ap.toString()
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {