dd
This commit is contained in:
@@ -32,6 +32,7 @@ export class BuffComp extends Component {
|
||||
wind_cd:number=0;
|
||||
speek_time:number=0;
|
||||
|
||||
|
||||
start() {
|
||||
this.info_init()
|
||||
}
|
||||
@@ -60,8 +61,10 @@ export class BuffComp extends Component {
|
||||
}
|
||||
hp_show(){
|
||||
if(this.node.getComponent(HeroViewComp).fac == 0) {
|
||||
this.top_node.getChildByName("hp").active = false;
|
||||
this.update_info_hp()
|
||||
}else{
|
||||
this.top_node.getChildByName("lv").active = true;
|
||||
let hp=this.node.getComponent(HeroViewComp).hp;
|
||||
let hp_max=this.node.getComponent(HeroViewComp).hp_max;
|
||||
let hp_progress= hp/hp_max;
|
||||
@@ -79,8 +82,6 @@ export class BuffComp extends Component {
|
||||
update_info_hp(){
|
||||
let ihp_node = this.top_node.getChildByName("ihp");
|
||||
ihp_node.getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).hp.toFixed(0)
|
||||
this.hp_show()
|
||||
|
||||
}
|
||||
|
||||
update_info_ap(){
|
||||
|
||||
Reference in New Issue
Block a user