This commit is contained in:
2024-09-26 16:58:26 +08:00
parent 5e421dceae
commit db316a5056
4 changed files with 5017 additions and 2651 deletions

View File

@@ -200,8 +200,38 @@ export class CardControllerComp extends CCComp {
smc.vm_data.gold.time = 0;
}
}
mission_change(){
this.node.getChildByName("mission").active=!this.node.getChildByName("mission").active
to_mission(){
this.node.getChildByName("mission_home").active=true
this.node.getChildByName("hero").active=false
this.node.getChildByName("home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").setScale(1.2,1.2)
this.node.getChildByName("bar").getChildByName("hero_btn").setScale(1,1)
this.node.getChildByName("bar").getChildByName("home_btn").setScale(1,1)
}
to_home(){
this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=false
this.node.getChildByName("home").active=true
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("mission_btn").setScale(1,1)
this.node.getChildByName("bar").getChildByName("hero_btn").setScale(1,1)
this.node.getChildByName("bar").getChildByName("home_btn").setScale(1.2,1.2)
}
to_hero(){
this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=true
this.node.getChildByName("home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").setScale(1,1)
this.node.getChildByName("bar").getChildByName("hero_btn").setScale(1.2,1.2)
this.node.getChildByName("bar").getChildByName("home_btn").setScale(1,1)
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {