血条扣血特效

This commit is contained in:
2025-08-16 15:32:39 +08:00
parent 0d3f789bdc
commit 9ccd63be3c
3 changed files with 404 additions and 49 deletions

View File

@@ -172,6 +172,9 @@ export class HeroViewComp extends CCComp {
let hp_max=this.Attrs[BuffAttr.HP_MAX];
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;
}
do_fight_end(){