强化单局 弱化成长

This commit is contained in:
2025-02-25 12:58:08 +08:00
parent acaa0ea442
commit 94b8c992da
5 changed files with 2482 additions and 15015 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "f6f84e06-578b-446b-b5d7-595b686efbe0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -28,13 +28,10 @@ export class CardControllerComp extends CCComp {
bbg_y:number=40
bbg_x:any=[-300,-150,0,150,300]
protected onLoad(): void {
this.bbg=this.node.getChildByName("bar").getChildByName("bbg")
oops.message.on(GameEvent.MissionStart,this.mission_home_to_mission,this)
// oops.message.on(GameEvent.MissionEnd,this.mission_home_to_mission,this)
}
start() {
this.bbg=this.node.getChildByName("bar").getChildByName("bbg")
this.bbg.setPosition(v3(this.bbg_x[2],this.bbg_y))
this.page_init()
}
@@ -50,15 +47,9 @@ export class CardControllerComp extends CCComp {
}
page_init(){
this.node.getChildByName("mission_home").active=true;
this.node.getChildByName("hero_home").active = false;
this.node.getChildByName("shop_home").active = false;
this.node.getChildByName("battle_home").active = false;
this.node.getChildByName("luck_home").active = false;
this.node.getChildByName("mission").active = false;
}
mission_home_to_mission(){
this.node.getChildByName("bar").active=false;
let mission=this.node.getChildByName("mission").getComponent(MissionComp)
mission.node.active = true;
mission.mission_start()
@@ -66,43 +57,10 @@ export class CardControllerComp extends CCComp {
}
mission_to_mission_home(){
let mission_home=this.node.getChildByName("mission_home").getComponent(MissionHomeComp)
this.bar_change(null,"home")
this.node.getChildByName("bar").active=true;
this.node.getChildByName("mission_home").active = true
mission_home.load_ui_heros()
}
bar_change(e:any,args:any){
console.log("bar_change",args)
this.node.getChildByName("bar").active=true;
this.node.getChildByName("mission").active = false;
this.node.getChildByName("hero_home").active = false
this.node.getChildByName("mission_home").active = false
this.node.getChildByName("shop_home").active = false
this.node.getChildByName("battle_home").active = false
this.node.getChildByName("luck_home").active = false
switch(args){
case "hero":
this.node.getChildByName("hero_home").active = true
this.bbg.setPosition(v3(this.bbg_x[1],this.bbg_y))
break;
case "shop":
this.node.getChildByName("shop_home").active = true
this.bbg.setPosition(v3(this.bbg_x[0],this.bbg_y))
break;
// case "battle":
// this.node.getChildByName("battle_home").active = true
// this.bbg.setPosition(v3(this.bbg_x[4],this.bbg_y))
break;
case "luck":
this.node.getChildByName("luck_home").active = true
this.bbg.setPosition(v3(this.bbg_x[3],this.bbg_y))
break;
case "home":
this.node.getChildByName("mission_home").active = true
this.bbg.setPosition(v3(this.bbg_x[2],this.bbg_y))
this.node.getChildByName("mission_home").getComponent(MissionHomeComp).update_hero_cards()
break;
}
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {

View File

@@ -108,10 +108,7 @@ export class MissionComp extends CCComp {
to_mission_home(){
this.colose_victory()
let home =this.node.parent.getComponent(CardControllerComp);
let mission_home=home.node.getChildByName("mission_home").getComponent(MissionHomeComp)
home.bar_change(null,"home")
home.node.getChildByName("bar").active=true;
mission_home.load_ui_heros()
home.mission_to_mission_home()
}
mission_init(){
//局内数据初始化

View File

@@ -54,7 +54,6 @@ export class MissionHomeComp extends CCComp {
]
oops.message.dispatchEvent(GameEvent.MissionStart, {})
this.node.active=false;
}
init_buff(){
smc.vmdata.mission.ap_up=MBSet.ap_add*smc.vmdata.buff_num[0]/MBSet.ap_cost