diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 408da251..b4848455 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -91,7 +91,7 @@ "__id__": 11 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 19 @@ -121,7 +121,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.7, + "x": 0.9, "y": 1, "z": 1 }, @@ -741,7 +741,7 @@ "__id__": 39 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 45 @@ -752,8 +752,8 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": -12.854, + "x": -23.841, + "y": -33.63, "z": 0 }, "_lrot": { @@ -765,8 +765,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 0.8, - "y": 0.8, + "x": 1.2, + "y": 1.2, "z": 1 }, "_mobility": 0, diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index 7dc6de0e..00a2fb4b 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -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(){