战斗信息显示
This commit is contained in:
@@ -89,8 +89,8 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
onLoad() {
|
||||
this.as = this.getComponent(HeroSpine);
|
||||
let anm = this.node.getChildByName("anm")
|
||||
anm.setScale(anm.scale.x*0.8,anm.scale.y*0.8);
|
||||
// let anm = this.node.getChildByName("anm")
|
||||
// anm.setScale(anm.scale.x*0.8,anm.scale.y*0.8);
|
||||
// 注册单个碰撞体的回调函数
|
||||
|
||||
// let collider = this.getComponent(Collider2D);
|
||||
@@ -149,6 +149,10 @@ export class HeroViewComp extends CCComp {
|
||||
get isActive() {
|
||||
return this.ent.has(HeroViewComp) && this.node?.isValid;
|
||||
}
|
||||
hide_info(){
|
||||
this.node.getChildByName("top").getChildByName("ihp").active = false;
|
||||
this.node.getChildByName("top").getChildByName("iap").active = false;
|
||||
}
|
||||
hp_show(){
|
||||
let hp_progress= this.hp/this.hp_max;
|
||||
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
|
||||
|
||||
Reference in New Issue
Block a user