ui调整
This commit is contained in:
@@ -80,14 +80,6 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
diamond:0, //商店购买 及 双倍奖励资源
|
||||
meat:0,
|
||||
exp:0, //升级经验
|
||||
ghstone:0, //英雄石 绿色 普通英雄升星
|
||||
bhstone:0, //英雄石 蓝色 稀有英雄升星
|
||||
phlestone:0, //英雄石 紫色 史诗英雄升星
|
||||
rhstone:0, //英雄石 红色 传说英雄升星
|
||||
herocard:0, //英雄卡,抽卡凭证
|
||||
ckey:0, //铜钥匙 解锁稀有英雄 也可以直接兑换金币
|
||||
skey:0, //银钥匙 解锁史诗英雄 也可以直接兑换金币
|
||||
gkey:0, //金钥匙 解锁传说英雄 也可以直接兑换金币
|
||||
}
|
||||
};
|
||||
vmAdd() {
|
||||
@@ -123,7 +115,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
|
||||
setFightHero(position:number,heroId:number,autoSave:boolean=true){
|
||||
this.fight_heros[position] = heroId;
|
||||
if(autoSave){
|
||||
if(this.isWxClient()){
|
||||
this.updateFightHeros()
|
||||
}
|
||||
}
|
||||
@@ -142,11 +134,18 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
return heros_uuid
|
||||
}
|
||||
levelUpHero(heroId:number,exp:number,gold:number){
|
||||
let result=this.gameDataSyncManager.levelUpHero(heroId,exp,gold);
|
||||
if(result){
|
||||
this.heros[heroId].lv++;
|
||||
if(this.isWxClient()){
|
||||
let result=this.gameDataSyncManager.levelUpHero(heroId,exp,gold);
|
||||
if(result){
|
||||
this.heros[heroId].lv++;
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
else{
|
||||
this.heros[heroId].lv++;
|
||||
return true
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ export class Test{
|
||||
user_id: "local_debug",
|
||||
openid: "local_debug",
|
||||
regist_time: Date.now(),
|
||||
data: JSON.parse(oops.storage.get("data")),
|
||||
fight_heros: JSON.parse(oops.storage.get("fight_heros")),
|
||||
heros: JSON.parse(oops.storage.get("heros")),
|
||||
items: JSON.parse(oops.storage.get("items")),
|
||||
tals: JSON.parse(oops.storage.get("tals")),
|
||||
equips: JSON.parse(oops.storage.get("equips"))
|
||||
data: JSON.parse(oops.storage.get("data")||null),
|
||||
fight_heros: JSON.parse(oops.storage.get("fight_heros")||null),
|
||||
heros: JSON.parse(oops.storage.get("heros")||null),
|
||||
items: JSON.parse(oops.storage.get("items")||null),
|
||||
tals: JSON.parse(oops.storage.get("tals")||null),
|
||||
equips: JSON.parse(oops.storage.get("equips")||null)
|
||||
}
|
||||
return local_data
|
||||
}
|
||||
|
||||
@@ -443,3 +443,4 @@ export class GameDataManager {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user