fix: 修复战斗开始时不调用卡牌和英雄初始等级问题

修复MissionComp中战斗开始时未调用call_cards方法的问题
调整SingletonModuleComp中英雄初始等级从1改为0
在MissionCardComp和HInfoComp中添加关闭解锁和购买界面的逻辑
更新ubtns.plist.meta中的边框设置
This commit is contained in:
walkpan
2026-01-08 09:18:20 +08:00
parent 76b89442f9
commit 2d560b2a2a
6 changed files with 18126 additions and 9381 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2830,10 +2830,10 @@
"height": 63,
"rawWidth": 229,
"rawHeight": 63,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 20,
"borderBottom": 31,
"borderLeft": 30,
"borderRight": 30,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,

View File

@@ -111,7 +111,7 @@ export class SingletonModuleComp extends ecs.Comp {
path:'',
as:0,
type:0,
lv:1,
lv:0,
exp:0,
exp_max:100,
exp_pre:0,

View File

@@ -76,6 +76,8 @@ export class HInfoComp extends CCComp {
this.update_data(this.h_uuid)
this.load_all_hero(this.h_uuid)
this.showInfo()
this.close_buy()
this.close_ranks()
}
update(deltaTime: number) {
@@ -276,6 +278,18 @@ export class HInfoComp extends CCComp {
this.moveHeroesLeft();
this.show_lock()
}
show_buy(){
this.node.getChildByName("unlock").active=true
}
close_buy(){
this.node.getChildByName("unlock").active=false
}
show_ranks(){
this.node.getChildByName("ranks").active=true
}
close_ranks(){
this.node.getChildByName("ranks").active=false
}
buy_hero(){
console.info("[HInfoComp]:buy_hero",this.h_uuid)
if(smc.vmdata.gold < HeroConf.COST) {
@@ -285,6 +299,7 @@ export class HInfoComp extends CCComp {
smc.addHero(this.h_uuid)
this.load_all_hero(this.h_uuid)
this.show_lock()
this.close_buy()
}
start_mission() {
oops.message.dispatchEvent(GameEvent.MissionStart, {})

View File

@@ -349,6 +349,7 @@ export class MissionCardComp extends CCComp {
this.Lock.active = false;
oops.gui.toast("解锁成功");
}
this.closeUnLock();
}
coinCloseLock(){
let cost = smc.vmdata.mission_data.unlockCoin;

View File

@@ -175,7 +175,6 @@ export class MissionComp extends CCComp {
to_fight(){
smc.mission.in_fight=true
oops.message.dispatchEvent(GameEvent.FightStart) //GameSetMonComp 监听刷怪
this.call_cards(smc.vmdata.hero.lv)
}