增加月卡购买配置
This commit is contained in:
parent
851d400b42
commit
b3ef494ea9
|
@ -640,7 +640,7 @@ export default class JiaZai extends cc.Component {
|
||||||
if (order.itemid == "gold_1" || order.itemid == "gold_2" || order.itemid == "gold_3"
|
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 == "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_1" || order.itemid == "unlimited_health_bundle_2"
|
||||||
|| order.itemid == "unlimited_health_bundle_3"
|
|| order.itemid == "unlimited_health_bundle_3" || order.itemid == "month_Test"
|
||||||
) {
|
) {
|
||||||
this.openLoad();
|
this.openLoad();
|
||||||
console.log("补发名称:", order.itemid);
|
console.log("补发名称:", order.itemid);
|
||||||
|
@ -661,6 +661,7 @@ export default class JiaZai extends cc.Component {
|
||||||
else if (order.itemid == "unlimited_health_bundle_1") { coinTemp = 5000; }
|
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_2") { coinTemp = 12000; }
|
||||||
else if (order.itemid == "unlimited_health_bundle_3") { coinTemp = 30000; }
|
else if (order.itemid == "unlimited_health_bundle_3") { coinTemp = 30000; }
|
||||||
|
else if (order.itemid == "month_Test") { coinTemp = 5000; }
|
||||||
let title = "充值补发奖励金币:" + coinTemp;
|
let title = "充值补发奖励金币:" + coinTemp;
|
||||||
MiniGameSdk.API.showToast(title);
|
MiniGameSdk.API.showToast(title);
|
||||||
cc.fx.GameTool.shopBuy(productId, true);
|
cc.fx.GameTool.shopBuy(productId, true);
|
||||||
|
|
|
@ -133,6 +133,7 @@ export default class MapConroler extends cc.Component {
|
||||||
powerState: boolean = false; //
|
powerState: boolean = false; //
|
||||||
SceneManager: any;
|
SceneManager: any;
|
||||||
lastMagicTime: number;
|
lastMagicTime: number;
|
||||||
|
opBlock: any;
|
||||||
|
|
||||||
|
|
||||||
// mapInfo: number[][] = [];
|
// mapInfo: number[][] = [];
|
||||||
|
@ -2781,7 +2782,23 @@ export default class MapConroler extends cc.Component {
|
||||||
|
|
||||||
//提前判断游戏结束
|
//提前判断游戏结束
|
||||||
predict_End() {
|
predict_End() {
|
||||||
|
console.log("提前判断游戏结束");
|
||||||
|
let count = 0;
|
||||||
|
for (let i = 0; i < this.blocks.length; i++) {
|
||||||
|
//确保方块是可移动状态下再做判断
|
||||||
|
if (this.blockCanMove(this.blocks[i])) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断方块是否是可移动类型
|
||||||
|
blockCanMove(block) {
|
||||||
|
if (block.getComponent("Block").type == 10 || block.getComponent("Block").type == 3
|
||||||
|
|| block.getComponent("Block").type == 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1035,6 +1035,15 @@ var GameTool = {
|
||||||
{ type: "infinite_health", count: 7200 },
|
{ type: "infinite_health", count: 7200 },
|
||||||
]
|
]
|
||||||
break;
|
break;
|
||||||
|
case "month_Test":
|
||||||
|
cc.fx.GameTool.changeCoin(6000);
|
||||||
|
coin = 6000;
|
||||||
|
price = 100;
|
||||||
|
// MiniGameSdk.API.showToast("充值成功,获得240000金币");
|
||||||
|
rewardData = [
|
||||||
|
{ type: "coin", count: coin },
|
||||||
|
]
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
"premultiplyAlpha": false,
|
"premultiplyAlpha": false,
|
||||||
"genMipmaps": false,
|
"genMipmaps": false,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"width": 504,
|
"width": 503,
|
||||||
"height": 1053,
|
"height": 1104,
|
||||||
"platformSettings": {},
|
"platformSettings": {},
|
||||||
"subMetas": {}
|
"subMetas": {}
|
||||||
}
|
}
|
|
@ -1,415 +0,0 @@
|
||||||
{
|
|
||||||
"LEVEL_INFO": [
|
|
||||||
{
|
|
||||||
"risefall": [],
|
|
||||||
"id": "42",
|
|
||||||
"map": [
|
|
||||||
8,
|
|
||||||
13
|
|
||||||
],
|
|
||||||
"time": 150,
|
|
||||||
"gap": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"BLOCK_INFO": [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"block": 2,
|
|
||||||
"color": 2,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -240,
|
|
||||||
"y": 420,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 210
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 5,
|
|
||||||
"color": 2,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": 420,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 220
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 5,
|
|
||||||
"type": 7,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": 540,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 230
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 0,
|
|
||||||
"color": 1,
|
|
||||||
"type": 8,
|
|
||||||
"position": {
|
|
||||||
"x": -240,
|
|
||||||
"y": 300,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 240
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 2,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 240,
|
|
||||||
"y": 60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 250
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -240,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 260
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -120,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 270
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 0,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 280
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 290
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 240,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 300
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 23,
|
|
||||||
"color": 1,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": -60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 310
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 0,
|
|
||||||
"color": 2,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": 60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 320
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 0,
|
|
||||||
"color": 5,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 330
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 8,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": 180,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 340
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 2,
|
|
||||||
"color": 8,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -120,
|
|
||||||
"y": 300,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 350
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 6,
|
|
||||||
"color": 5,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": 60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 360
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 0,
|
|
||||||
"color": 7,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -240,
|
|
||||||
"y": -180,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 370
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 7,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": -120,
|
|
||||||
"y": -660,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 380
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 5,
|
|
||||||
"color": 7,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": -660,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 390
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 7,
|
|
||||||
"type": 7,
|
|
||||||
"position": {
|
|
||||||
"x": -120,
|
|
||||||
"y": -420,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 400
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 0,
|
|
||||||
"color": 4,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": -180,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 440
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 9,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": -180,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 420
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 1,
|
|
||||||
"color": 9,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": -300,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 430
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 2,
|
|
||||||
"color": 9,
|
|
||||||
"type": 0,
|
|
||||||
"position": {
|
|
||||||
"x": 360,
|
|
||||||
"y": -660,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"id": 440
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 5,
|
|
||||||
"color": 4,
|
|
||||||
"type": 4,
|
|
||||||
"position": {
|
|
||||||
"x": 120,
|
|
||||||
"y": -420,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"freezeTime": 12,
|
|
||||||
"id": 450
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"block": 21,
|
|
||||||
"color": 8,
|
|
||||||
"type": 4,
|
|
||||||
"position": {
|
|
||||||
"x": -240,
|
|
||||||
"y": 60,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"freezeTime": 5,
|
|
||||||
"id": 460
|
|
||||||
}
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"WALL_INFO": [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"num": 24,
|
|
||||||
"color": 7,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"num": 25,
|
|
||||||
"color": 7,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"num": 15,
|
|
||||||
"color": 4,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"num": 17,
|
|
||||||
"color": 4,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"num": 1,
|
|
||||||
"color": 9,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 6,
|
|
||||||
"num": 2,
|
|
||||||
"color": 9,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 7,
|
|
||||||
"num": 8,
|
|
||||||
"color": 5,
|
|
||||||
"special": 0,
|
|
||||||
"length": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 8,
|
|
||||||
"num": 9,
|
|
||||||
"color": 5,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 9,
|
|
||||||
"num": 10,
|
|
||||||
"color": 5,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 10,
|
|
||||||
"num": 12,
|
|
||||||
"color": 1,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 11,
|
|
||||||
"num": 14,
|
|
||||||
"color": 1,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 12,
|
|
||||||
"num": 16,
|
|
||||||
"color": 8,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 13,
|
|
||||||
"num": 18,
|
|
||||||
"color": 8,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 14,
|
|
||||||
"num": 20,
|
|
||||||
"color": 2,
|
|
||||||
"special": 0,
|
|
||||||
"length": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 15,
|
|
||||||
"num": 22,
|
|
||||||
"color": 2,
|
|
||||||
"special": 0,
|
|
||||||
"length": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"ver": "1.0.2",
|
|
||||||
"uuid": "e04b3e89-8b08-4014-9e5e-d36b3cf8d5a0",
|
|
||||||
"importer": "json",
|
|
||||||
"subMetas": {}
|
|
||||||
}
|
|
|
@ -8,8 +8,8 @@
|
||||||
"premultiplyAlpha": false,
|
"premultiplyAlpha": false,
|
||||||
"genMipmaps": false,
|
"genMipmaps": false,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"width": 1831,
|
"width": 1830,
|
||||||
"height": 826,
|
"height": 964,
|
||||||
"platformSettings": {},
|
"platformSettings": {},
|
||||||
"subMetas": {}
|
"subMetas": {}
|
||||||
}
|
}
|
|
@ -394,6 +394,9 @@ export default class NewClass extends cc.Component {
|
||||||
case "unlimited_health_bundle_3":
|
case "unlimited_health_bundle_3":
|
||||||
price = 10800;
|
price = 10800;
|
||||||
break;
|
break;
|
||||||
|
case "month_Test":
|
||||||
|
price = 100;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
//console.log("获得商品id:", id, count, price);
|
//console.log("获得商品id:", id, count, price);
|
||||||
// 判断设备系统
|
// 判断设备系统
|
||||||
|
|
Loading…
Reference in New Issue
Block a user