提速了下

This commit is contained in:
panw
2025-07-21 14:36:57 +08:00
parent 9b4e9073a2
commit 163e8273c5
8 changed files with 24 additions and 3522 deletions

View File

@@ -37,6 +37,7 @@ export class BuffComp extends Component {
speek_time:number=0;
HeroView:HeroViewComp=null!
FIGHTCON:FightConComp=null!
hp_bar:any=null
protected onLoad(): void {
oops.message.on(GameEvent.UpdateVMData,this.to_update_vmdata,this)
}
@@ -50,6 +51,7 @@ export class BuffComp extends Component {
this.top_node = this.node.getChildByName("top");
let hp_y=this.node.getComponent(UITransform).height+20
this.top_node.setPosition(0,hp_y,0)
this.hp_bar=this.top_node.getChildByName("hp").getComponent(ProgressBar)
// this.top_node.getChildByName("hp").active=(this.node.getComponent(HeroViewComp).fac == 1 ? true : false)
this.vmdata_update()
@@ -70,7 +72,7 @@ export class BuffComp extends Component {
if(this.buff_cd <= 0 && this.node.getChildByName("buff").active){
this.node.getChildByName("buff").active = false;
}
this.in_speek(deltaTime)
// this.in_speek(deltaTime)
// this.vmdata_update()
}
hp_show(){
@@ -78,7 +80,7 @@ export class BuffComp extends Component {
let hp=this.HeroView.hp;
let hp_max=this.HeroView.hp_max;
let hp_progress= hp/hp_max;
this.top_node.getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
this.hp_bar.progress = hp_progress;
if(this.HeroView.is_boss) return
this.top_node.getChildByName("hp").active = (hp == hp_max) ? false : true;
}