护盾改为 护甲值

This commit is contained in:
2025-08-17 12:25:22 +08:00
parent 6288d4e4bb
commit e5874bf936
15 changed files with 8903 additions and 8921 deletions

View File

@@ -69,11 +69,26 @@ export class BuffComp extends Component {
// this.vmdata_update()
}
show_shield(val:boolean){
this.node.getChildByName("shielded").active=val
show_shield(shield:number=0,shield_max:number=0){
let shield_progress= shield/shield_max;
this.node.getChildByName("shielded").active=shield > 0
this.node.getChildByName("top").getChildByName("shield").active=shield > 0
this.node.getChildByName("top").getChildByName("shield").getComponent(ProgressBar).progress = shield_progress;
this.scheduleOnce(()=>{
this.node.getChildByName("top").getChildByName("shield").getChildByName("pb").getComponent(ProgressBar).progress = shield_progress;
},0.15)
}
hp_show(hp:number,hp_max:number){
// if(this.node.getComponent(HeroViewComp).fac == 0) return
let hp_progress= hp/hp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar).progress = hp_progress;
this.scheduleOnce(()=>{
this.node.getChildByName("top").getChildByName("hp").getChildByName("hpb").getComponent(ProgressBar).progress = hp_progress;
},0.15)
// this.node.getChildByName("top").getChildByName("hp").active = (hp == hp_max) ? false : true;
}
update_info_lv(){