修改月卡
This commit is contained in:
parent
3cfa725e71
commit
1575fea359
File diff suppressed because it is too large
Load Diff
|
@ -603,12 +603,15 @@ export default class Block extends cc.Component {
|
|||
MapConroler._instance.nextLevel();
|
||||
this.node.active = false;
|
||||
this.node.removeFromParent();
|
||||
setTimeout(() => {
|
||||
if (type == true && MapConroler._instance.openWall.length > 0) {
|
||||
let gameover = MapConroler._instance.predict_End();
|
||||
if (gameover == false) {
|
||||
MapConroler._instance.failLevel("lock");
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
|
||||
// this.node.active = false;
|
||||
// this.node.removeFromParent();
|
||||
}, time * 1000);
|
||||
|
|
|
@ -118,6 +118,10 @@ export default class JiaZai extends cc.Component {
|
|||
return;
|
||||
}
|
||||
JiaZai.cachedMonthlyCardPrefab = prefab;
|
||||
//等级大于16开启
|
||||
if (cc.fx.GameConfig.GM_INFO.level >= 16) {
|
||||
this.monthH();
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -167,10 +171,7 @@ export default class JiaZai extends cc.Component {
|
|||
// //console.log("金币",cc.fx.GameConfig.GM_INFO.coin);
|
||||
// //console.log("关卡",cc.fx.GameConfig.GM_INFO.level+1);
|
||||
this.updatePower();
|
||||
//等级大于16开启
|
||||
if (cc.fx.GameConfig.GM_INFO.level >= 16) {
|
||||
this.monthH();
|
||||
};
|
||||
|
||||
|
||||
cc.fx.GameTool.getHealth(null);
|
||||
// cc.fx.GameConfig.LEVEL_INFO_init(false,0);
|
||||
|
@ -319,7 +320,7 @@ export default class JiaZai extends cc.Component {
|
|||
this.Stamina.getChildByName("time").getComponent(cc.Label).string = timeTemp;
|
||||
}
|
||||
}
|
||||
console.log(cc.fx.GameConfig.GM_INFO.hp, cc.fx.GameConfig.GM_INFO.hp_Max, "月卡体力");
|
||||
// console.log(cc.fx.GameConfig.GM_INFO.hp, cc.fx.GameConfig.GM_INFO.hp_Max, "月卡体力");
|
||||
}.bind(this);
|
||||
this.schedule(this.scheduleCallback, 1);
|
||||
}
|
||||
|
@ -642,7 +643,7 @@ export default class JiaZai extends cc.Component {
|
|||
if (order.itemid == "gold_1" || order.itemid == "gold_2" || order.itemid == "gold_3"
|
||||
|| order.itemid == "gold_4" || order.itemid == "gold_5" || order.itemid == "gold_6"
|
||||
|| order.itemid == "unlimited_health_bundle_1" || order.itemid == "unlimited_health_bundle_2"
|
||||
|| order.itemid == "unlimited_health_bundle_3" || order.itemid == "month_Test"
|
||||
|| order.itemid == "unlimited_health_bundle_3" || order.itemid == "month_Card"
|
||||
) {
|
||||
this.openLoad();
|
||||
console.log("补发名称:", order.itemid);
|
||||
|
@ -663,7 +664,12 @@ export default class JiaZai extends cc.Component {
|
|||
else if (order.itemid == "unlimited_health_bundle_1") { coinTemp = 5000; }
|
||||
else if (order.itemid == "unlimited_health_bundle_2") { coinTemp = 12000; }
|
||||
else if (order.itemid == "unlimited_health_bundle_3") { coinTemp = 30000; }
|
||||
else if (order.itemid == "month_Test") { coinTemp = 5000; }
|
||||
else if (order.itemid == "month_Card") {
|
||||
coinTemp = 6000;
|
||||
cc.fx.GameConfig.GM_INFO.doubleCoin = 2;
|
||||
cc.fx.GameConfig.GM_INFO.hp_Max = 7;
|
||||
cc.fx.GameConfig.GM_INFO.hp = 7;
|
||||
}
|
||||
let title = "充值补发奖励金币:" + coinTemp;
|
||||
MiniGameSdk.API.showToast(title);
|
||||
cc.fx.GameTool.shopBuy(productId, true);
|
||||
|
|
|
@ -2845,6 +2845,22 @@ export default class MapConroler extends cc.Component {
|
|||
//判断方块是否可以正常通过门
|
||||
blockCanPass(block, wall) {
|
||||
let jg = false;
|
||||
let heng = block.getComponent("Block").heng;
|
||||
let shu = block.getComponent("Block").shu;
|
||||
let direction = wall.node.parent.name;
|
||||
if (direction == "left" || direction == "right") {
|
||||
if (wall.wall_Info.length >= shu) {
|
||||
jg = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (wall.wall_Info.length >= heng) {
|
||||
jg = true;
|
||||
}
|
||||
}
|
||||
if (!jg) {
|
||||
console.log("普通快:不可通过");
|
||||
}
|
||||
return jg;
|
||||
}
|
||||
|
||||
|
|
|
@ -1035,10 +1035,10 @@ var GameTool = {
|
|||
{ type: "infinite_health", count: 7200 },
|
||||
]
|
||||
break;
|
||||
case "month_Test":
|
||||
case "month_Card":
|
||||
cc.fx.GameTool.changeCoin(6000);
|
||||
coin = 6000;
|
||||
price = 100;
|
||||
price = 3000;
|
||||
// MiniGameSdk.API.showToast("充值成功,获得240000金币");
|
||||
rewardData = [
|
||||
{ type: "coin", count: coin },
|
||||
|
|
|
@ -79,7 +79,7 @@ export default class NewClass extends cc.Component {
|
|||
console.log("_________正式发货");
|
||||
MiniGameSdk.API.showToast("充值成功");
|
||||
cc.fx.GameTool.shopBuy(this.iosProductId, false);
|
||||
if (this.iosProductId == "month_Test") {
|
||||
if (this.iosProductId == "month_Card") {
|
||||
this.buyMonthCard();
|
||||
}
|
||||
//console.log("充值成功获得金币");
|
||||
|
@ -286,8 +286,8 @@ export default class NewClass extends cc.Component {
|
|||
let count = 1;
|
||||
id = productId;
|
||||
switch (productId) {
|
||||
case "month_Test":
|
||||
price = 100;
|
||||
case "month_Card":
|
||||
price = 3000;
|
||||
break;
|
||||
}
|
||||
console.log("获得商品id:", id, count, price);
|
||||
|
@ -412,7 +412,7 @@ export default class NewClass extends cc.Component {
|
|||
console.log("7.14_________正式发货");
|
||||
MiniGameSdk.API.showToast("充值成功");
|
||||
cc.fx.GameTool.shopBuy(productId, false);
|
||||
if (productId == "month_Test") {
|
||||
if (productId == "month_Card") {
|
||||
this.buyMonthCard();
|
||||
}
|
||||
//console.log("充值成功获得金币");
|
||||
|
|
|
@ -1081,7 +1081,7 @@
|
|||
"component": "",
|
||||
"_componentId": "191edqNaKdPtJiA4/cSsB1N",
|
||||
"handler": "buyProduct",
|
||||
"customEventData": "month_Test"
|
||||
"customEventData": "month_Card"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
|
|
|
@ -401,8 +401,8 @@ export default class NewClass extends cc.Component {
|
|||
case "unlimited_health_bundle_3":
|
||||
price = 10800;
|
||||
break;
|
||||
case "month_Test":
|
||||
price = 100;
|
||||
case "month_Card":
|
||||
price = 3000;
|
||||
break;
|
||||
}
|
||||
//console.log("获得商品id:", id, count, price);
|
||||
|
|
Loading…
Reference in New Issue
Block a user