修复bug和ui调整,下一步,达到特定等级才激活技能
This commit is contained in:
@@ -20,6 +20,7 @@ export class BarCompComp extends CCComp {
|
||||
hero:HeroViewComp = null;
|
||||
friend:HeroViewComp = null;
|
||||
boss:HeroViewComp = null;
|
||||
update_count:number=0
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
protected onLoad(): void {
|
||||
this.on(GameEvent.FightReady,this.readay,this)
|
||||
@@ -38,6 +39,7 @@ export class BarCompComp extends CCComp {
|
||||
this.node.getChildByName("bar").active = true
|
||||
this.node.getChildByName("bar").getChildByName("more").active=false
|
||||
this.node.getChildByName("bar").getChildByName("uplv").active=false
|
||||
this.update_count=0
|
||||
}
|
||||
private master_called(e:any,data:any){
|
||||
this.node.getChildByName("bar").active = true
|
||||
@@ -62,9 +64,12 @@ export class BarCompComp extends CCComp {
|
||||
}
|
||||
}
|
||||
show_uplv_button(){
|
||||
this.update_count++
|
||||
this.node.getChildByName("bar").getChildByName("uplv").active=true
|
||||
}
|
||||
hide_uplv_button(){
|
||||
this.update_count--
|
||||
if(this.update_count > 0) return
|
||||
this.node.getChildByName("bar").getChildByName("uplv").active=false
|
||||
}
|
||||
show_master_more(){
|
||||
|
||||
Reference in New Issue
Block a user