fix: 修复战斗开始时不调用卡牌和英雄初始等级问题
修复MissionComp中战斗开始时未调用call_cards方法的问题 调整SingletonModuleComp中英雄初始等级从1改为0 在MissionCardComp和HInfoComp中添加关闭解锁和购买界面的逻辑 更新ubtns.plist.meta中的边框设置
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2830,10 +2830,10 @@
|
|||||||
"height": 63,
|
"height": 63,
|
||||||
"rawWidth": 229,
|
"rawWidth": 229,
|
||||||
"rawHeight": 63,
|
"rawHeight": 63,
|
||||||
"borderTop": 0,
|
"borderTop": 20,
|
||||||
"borderBottom": 0,
|
"borderBottom": 31,
|
||||||
"borderLeft": 0,
|
"borderLeft": 30,
|
||||||
"borderRight": 0,
|
"borderRight": 30,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"pixelsToUnit": 100,
|
"pixelsToUnit": 100,
|
||||||
"pivotX": 0.5,
|
"pivotX": 0.5,
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
path:'',
|
path:'',
|
||||||
as:0,
|
as:0,
|
||||||
type:0,
|
type:0,
|
||||||
lv:1,
|
lv:0,
|
||||||
exp:0,
|
exp:0,
|
||||||
exp_max:100,
|
exp_max:100,
|
||||||
exp_pre:0,
|
exp_pre:0,
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ export class HInfoComp extends CCComp {
|
|||||||
this.update_data(this.h_uuid)
|
this.update_data(this.h_uuid)
|
||||||
this.load_all_hero(this.h_uuid)
|
this.load_all_hero(this.h_uuid)
|
||||||
this.showInfo()
|
this.showInfo()
|
||||||
|
this.close_buy()
|
||||||
|
this.close_ranks()
|
||||||
}
|
}
|
||||||
update(deltaTime: number) {
|
update(deltaTime: number) {
|
||||||
|
|
||||||
@@ -276,6 +278,18 @@ export class HInfoComp extends CCComp {
|
|||||||
this.moveHeroesLeft();
|
this.moveHeroesLeft();
|
||||||
this.show_lock()
|
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(){
|
buy_hero(){
|
||||||
console.info("[HInfoComp]:buy_hero",this.h_uuid)
|
console.info("[HInfoComp]:buy_hero",this.h_uuid)
|
||||||
if(smc.vmdata.gold < HeroConf.COST) {
|
if(smc.vmdata.gold < HeroConf.COST) {
|
||||||
@@ -285,6 +299,7 @@ export class HInfoComp extends CCComp {
|
|||||||
smc.addHero(this.h_uuid)
|
smc.addHero(this.h_uuid)
|
||||||
this.load_all_hero(this.h_uuid)
|
this.load_all_hero(this.h_uuid)
|
||||||
this.show_lock()
|
this.show_lock()
|
||||||
|
this.close_buy()
|
||||||
}
|
}
|
||||||
start_mission() {
|
start_mission() {
|
||||||
oops.message.dispatchEvent(GameEvent.MissionStart, {})
|
oops.message.dispatchEvent(GameEvent.MissionStart, {})
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ export class MissionCardComp extends CCComp {
|
|||||||
this.Lock.active = false;
|
this.Lock.active = false;
|
||||||
oops.gui.toast("解锁成功");
|
oops.gui.toast("解锁成功");
|
||||||
}
|
}
|
||||||
|
this.closeUnLock();
|
||||||
}
|
}
|
||||||
coinCloseLock(){
|
coinCloseLock(){
|
||||||
let cost = smc.vmdata.mission_data.unlockCoin;
|
let cost = smc.vmdata.mission_data.unlockCoin;
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ export class MissionComp extends CCComp {
|
|||||||
to_fight(){
|
to_fight(){
|
||||||
smc.mission.in_fight=true
|
smc.mission.in_fight=true
|
||||||
oops.message.dispatchEvent(GameEvent.FightStart) //GameSetMonComp 监听刷怪
|
oops.message.dispatchEvent(GameEvent.FightStart) //GameSetMonComp 监听刷怪
|
||||||
this.call_cards(smc.vmdata.hero.lv)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user