更新关卡配置
This commit is contained in:
parent
d9499a7f00
commit
1c6e8f7c2f
|
|
@ -29,6 +29,12 @@ export enum BlockType {
|
||||||
"叠加块上" = 10,
|
"叠加块上" = 10,
|
||||||
/*障碍块 */
|
/*障碍块 */
|
||||||
"障碍块" = 11,
|
"障碍块" = 11,
|
||||||
|
/*第二上锁块 */
|
||||||
|
"第二上锁块" = 12,
|
||||||
|
/*第二钥匙块 */
|
||||||
|
"第二钥匙块" = 13,
|
||||||
|
/*门钥匙 */
|
||||||
|
"门钥匙" = 14,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,12 +313,30 @@ export default class Block extends cc.Component {
|
||||||
key.parent = this.node;
|
key.parent = this.node;
|
||||||
key.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
key.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
||||||
break;
|
break;
|
||||||
|
case BlockType.第二钥匙块:
|
||||||
|
let key2 = cc.instantiate(MapConroler._instance.Block_Prop[2]);
|
||||||
|
key2.parent = this.node;
|
||||||
|
key2.color = cc.color(255, 125, 0);
|
||||||
|
key2.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
||||||
|
break;
|
||||||
|
case BlockType.门钥匙:
|
||||||
|
let key3 = cc.instantiate(MapConroler._instance.Block_Prop[2]);
|
||||||
|
key3.parent = this.node;
|
||||||
|
key3.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
||||||
|
break;
|
||||||
case BlockType.上锁块:
|
case BlockType.上锁块:
|
||||||
let lock = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
|
let lock = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
|
||||||
lock.parent = this.node;
|
lock.parent = this.node;
|
||||||
lock.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
lock.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
||||||
lock.getComponent("Lock").init(this.block_Info.lockTime);
|
lock.getComponent("Lock").init(this.block_Info.lockTime);
|
||||||
break;
|
break;
|
||||||
|
case BlockType.第二上锁块:
|
||||||
|
let lock2 = cc.instantiate(MapConroler._instance.Block_Prop[3]);
|
||||||
|
lock2.parent = this.node;
|
||||||
|
lock2.color = cc.color(255, 125, 0);
|
||||||
|
lock2.setPosition(posConfig.pos1.x, posConfig.pos1.y);
|
||||||
|
lock2.getComponent("Lock").init(this.block_Info.lockTime);
|
||||||
|
break;
|
||||||
case BlockType.冻结块:
|
case BlockType.冻结块:
|
||||||
let freeze = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
|
let freeze = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
|
||||||
freeze.parent = this.node;
|
freeze.parent = this.node;
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,6 @@ export default class JiaZai extends cc.Component {
|
||||||
|
|
||||||
// NumberToImage.numberToImageNodes(1000, 35, 15, "button_", coin, true);
|
// NumberToImage.numberToImageNodes(1000, 35, 15, "button_", coin, true);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 弹窗倒计时
|
// 弹窗倒计时
|
||||||
|
|
@ -531,13 +530,12 @@ export default class JiaZai extends cc.Component {
|
||||||
this.heathScheduleCallback = function () {
|
this.heathScheduleCallback = function () {
|
||||||
if (cc.fx.GameConfig.GM_INFO.min_Time <= 0) {
|
if (cc.fx.GameConfig.GM_INFO.min_Time <= 0) {
|
||||||
this.stopHeathTimeCutDown();
|
this.stopHeathTimeCutDown();
|
||||||
|
|
||||||
let timeTemp = cc.fx.GameTool.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time);
|
let timeTemp = cc.fx.GameTool.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time);
|
||||||
//console.log("健康值倒计时结束,当前时间:", timeTemp, cc.fx.GameConfig.GM_INFO.min_Time);
|
//console.log("健康值倒计时结束,当前时间:", timeTemp, cc.fx.GameConfig.GM_INFO.min_Time);
|
||||||
if (timeLabelNode) {
|
if (timeLabelNode) {
|
||||||
NumberToImage.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time, 50, "month_", timeLabelNode);
|
NumberToImage.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time, 50, "month_", timeLabelNode);
|
||||||
}
|
}
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.hp, 40, 20, "month_", this.heath, true);
|
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.hp, 40, 20, "time_", this.heath, true);
|
||||||
} else {
|
} else {
|
||||||
let timeTemp = cc.fx.GameTool.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time);
|
let timeTemp = cc.fx.GameTool.getTimeMargin(cc.fx.GameConfig.GM_INFO.min_Time);
|
||||||
if (timeLabelNode) {
|
if (timeLabelNode) {
|
||||||
|
|
@ -567,7 +565,7 @@ export default class JiaZai extends cc.Component {
|
||||||
this.Stamina.getChildByName("time").getComponent(cc.Label).string = timeTemp;
|
this.Stamina.getChildByName("time").getComponent(cc.Label).string = timeTemp;
|
||||||
}
|
}
|
||||||
if (cc.fx.GameConfig.GM_INFO.hp < cc.fx.GameConfig.GM_INFO.hp_Max) {
|
if (cc.fx.GameConfig.GM_INFO.hp < cc.fx.GameConfig.GM_INFO.hp_Max) {
|
||||||
// MiniGameSdk.API.showToast("恢复一点体力");
|
MiniGameSdk.API.showToast("恢复一点体力");
|
||||||
cc.fx.GameTool.setUserHealth(1, (data) => {
|
cc.fx.GameTool.setUserHealth(1, (data) => {
|
||||||
cc.fx.GameTool.getHealth((data) => {
|
cc.fx.GameTool.getHealth((data) => {
|
||||||
this.setHealthInfo(true);
|
this.setHealthInfo(true);
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,9 @@ export default class MapConroler extends cc.Component {
|
||||||
ishammer: boolean = false;//魔法棒与锤子区分
|
ishammer: boolean = false;//魔法棒与锤子区分
|
||||||
ismagic: boolean = false;//魔法棒状态
|
ismagic: boolean = false;//魔法棒状态
|
||||||
freezeArray: any; //冻结
|
freezeArray: any; //冻结
|
||||||
loackArray: any; //上锁
|
lockArray: any; //上锁块
|
||||||
|
lockArray2: any; //上锁块2
|
||||||
|
|
||||||
particleEffects: cc.ParticleAsset[];
|
particleEffects: cc.ParticleAsset[];
|
||||||
// leftDoors: []; //左门
|
// leftDoors: []; //左门
|
||||||
rightDoors: any; //右门
|
rightDoors: any; //右门
|
||||||
|
|
@ -440,7 +442,8 @@ export default class MapConroler extends cc.Component {
|
||||||
this.riseFallBlcok = [];
|
this.riseFallBlcok = [];
|
||||||
this.mapBlockArray = [];
|
this.mapBlockArray = [];
|
||||||
this.freezeArray = [];
|
this.freezeArray = [];
|
||||||
this.loackArray = [];
|
this.lockArray = [];
|
||||||
|
this.lockArray2 = [];
|
||||||
this.count_Time = 0;
|
this.count_Time = 0;
|
||||||
this.add_Time = 0;
|
this.add_Time = 0;
|
||||||
|
|
||||||
|
|
@ -1728,7 +1731,9 @@ export default class MapConroler extends cc.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.getComponent("Block").type == 2 || node.getComponent("Block").type == 4) {
|
// if (node.getComponent("Block").type == 2 || node.getComponent("Block").type == 4) {
|
||||||
|
//普通钥匙块
|
||||||
|
if (node.getComponent("Block").type == 2) {
|
||||||
let lockBlock = this.node.children.filter(child => {
|
let lockBlock = this.node.children.filter(child => {
|
||||||
if (child.getComponent("Block")) {
|
if (child.getComponent("Block")) {
|
||||||
if (child.getComponent("Block").type == 3)
|
if (child.getComponent("Block").type == 3)
|
||||||
|
|
@ -1739,8 +1744,34 @@ export default class MapConroler extends cc.Component {
|
||||||
for (let i = 0; i < lockBlock.length; i++) {
|
for (let i = 0; i < lockBlock.length; i++) {
|
||||||
lockBlock[i].getChildByName("lock").getComponent("Lock").reduce();
|
lockBlock[i].getChildByName("lock").getComponent("Lock").reduce();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//第二钥匙块
|
||||||
|
else if (node.getComponent("Block").type == 13) {
|
||||||
|
let lockBlock2 = this.node.children.filter(child => {
|
||||||
|
if (child.getComponent("Block")) {
|
||||||
|
if (child.getComponent("Block").type == 12)
|
||||||
|
return child
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (lockBlock2.length > 0)
|
||||||
|
for (let i = 0; i < lockBlock2.length; i++) {
|
||||||
|
lockBlock2[i].getChildByName("lock").getComponent("Lock").reduce();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//门钥匙块,消除门的
|
||||||
|
else if (node.getComponent("Block").type == 14) {
|
||||||
|
// let lockBlock2 = this.node.children.filter(child => {
|
||||||
|
// if (child.getComponent("Block")) {
|
||||||
|
// if (child.getComponent("Block").type == 13)
|
||||||
|
// return child
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// if (lockBlock2.length > 0)
|
||||||
|
// for (let i = 0; i < lockBlock2.length; i++) {
|
||||||
|
// lockBlock2[i].getChildByName("lock").getComponent("Lock").reduce();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (let i = 0; i < this.blocks.length; i++) {
|
for (let i = 0; i < this.blocks.length; i++) {
|
||||||
if (this.blocks[i] == node) {
|
if (this.blocks[i] == node) {
|
||||||
|
|
@ -1982,20 +2013,20 @@ export default class MapConroler extends cc.Component {
|
||||||
coin: -coin
|
coin: -coin
|
||||||
}
|
}
|
||||||
if (type == "time") {
|
if (type == "time") {
|
||||||
if (cc.fx.GameConfig.GM_INFO.review == 1) coin = 1000;
|
if (cc.fx.GameConfig.GM_INFO.review == 1) coin = 500;
|
||||||
else if (cc.fx.GameConfig.GM_INFO.review == 2) coin = 1500;
|
else if (cc.fx.GameConfig.GM_INFO.review == 2) coin = 500;
|
||||||
}
|
}
|
||||||
else if (type == "boom") {
|
else if (type == "boom") {
|
||||||
if (cc.fx.GameConfig.GM_INFO.reviewBoom == 1) coin = 1000;
|
if (cc.fx.GameConfig.GM_INFO.reviewBoom == 1) coin = 500;
|
||||||
else if (cc.fx.GameConfig.GM_INFO.reviewBoom == 2) coin = 1500;
|
else if (cc.fx.GameConfig.GM_INFO.reviewBoom == 2) coin = 500;
|
||||||
}
|
}
|
||||||
else if (type == "lock") {
|
else if (type == "lock") {
|
||||||
if (cc.fx.GameConfig.GM_INFO.reviewDoor == 1) coin = 1000;
|
if (cc.fx.GameConfig.GM_INFO.reviewDoor == 1) coin = 500;
|
||||||
else if (cc.fx.GameConfig.GM_INFO.reviewDoor == 2) coin = 1500;
|
else if (cc.fx.GameConfig.GM_INFO.reviewDoor == 2) coin = 500;
|
||||||
}
|
}
|
||||||
else if (type == "revolving") {
|
else if (type == "revolving") {
|
||||||
if (cc.fx.GameConfig.GM_INFO.reviewDoor == 1) coin = 1000;
|
if (cc.fx.GameConfig.GM_INFO.reviewDoor == 1) coin = 500;
|
||||||
else if (cc.fx.GameConfig.GM_INFO.reviewDoor == 2) coin = 1500;
|
else if (cc.fx.GameConfig.GM_INFO.reviewDoor == 2) coin = 500;
|
||||||
}
|
}
|
||||||
data.coin = -coin;
|
data.coin = -coin;
|
||||||
// console.log("自身金币:",cc.fx.GameConfig.GM_INFO.coin,"消耗金币:",coin);
|
// console.log("自身金币:",cc.fx.GameConfig.GM_INFO.coin,"消耗金币:",coin);
|
||||||
|
|
@ -2679,6 +2710,7 @@ export default class MapConroler extends cc.Component {
|
||||||
else MiniGameSdk.API.showToast("道具使用中,请稍后再试");
|
else MiniGameSdk.API.showToast("道具使用中,请稍后再试");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3170,7 +3202,12 @@ export default class MapConroler extends cc.Component {
|
||||||
// console.log("方块类型",this.blocks[i].getComponent("Block").type);
|
// console.log("方块类型",this.blocks[i].getComponent("Block").type);
|
||||||
if (this.blocks[i].getComponent("Block").type == 3) {
|
if (this.blocks[i].getComponent("Block").type == 3) {
|
||||||
if (this.blocks[i].getComponent("Block").block_Info.floor == undefined || this.blocks[i].getComponent("Block").block_Info.floor == null) {
|
if (this.blocks[i].getComponent("Block").block_Info.floor == undefined || this.blocks[i].getComponent("Block").block_Info.floor == null) {
|
||||||
this.loackArray.push(this.blocks[i]);
|
this.lockArray.push(this.blocks[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.blocks[i].getComponent("Block").type == 12) {
|
||||||
|
if (this.blocks[i].getComponent("Block").block_Info.floor == undefined || this.blocks[i].getComponent("Block").block_Info.floor == null) {
|
||||||
|
this.lockArray2.push(this.blocks[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.blocks[i].getComponent("Block").type == 4) {
|
else if (this.blocks[i].getComponent("Block").type == 4) {
|
||||||
|
|
@ -3222,13 +3259,18 @@ export default class MapConroler extends cc.Component {
|
||||||
time = 200;
|
time = 200;
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.freezeArray.length == 0 && this.loackArray.length == 0) {
|
if (this.freezeArray.length == 0 && this.lockArray.length == 0 && this.lockArray2.length == 0) {
|
||||||
// console.log("只剩下一个块道具使用完毕");
|
// console.log("只剩下一个块道具使用完毕");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (this.loackArray.length != 0) {
|
if (this.lockArray.length != 0) {
|
||||||
// console.log("消除一个普通块后,消除一个带锁块");
|
// console.log("消除一个普通块后,消除一个带锁块");
|
||||||
this.loackArray[0].getComponent("Block").eliminate(false);
|
this.lockArray[0].getComponent("Block").eliminate(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (this.lockArray2.length != 0) {
|
||||||
|
// console.log("消除一个普通块后,消除一个冻结块");
|
||||||
|
this.lockArray2[0].getComponent("Block").eliminate(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (this.freezeArray.length != 0) {
|
else if (this.freezeArray.length != 0) {
|
||||||
|
|
@ -3241,10 +3283,20 @@ export default class MapConroler extends cc.Component {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let count = 2;
|
let count = 2;
|
||||||
if (this.loackArray.length != 0) {
|
if (this.lockArray.length != 0) {
|
||||||
for (let i = 0; i < this.loackArray.length; i++) {
|
for (let i = 0; i < this.lockArray.length; i++) {
|
||||||
// console.log("没有普通快,魔法消除一个带锁块");
|
// console.log("没有普通快,魔法消除一个带锁块");
|
||||||
this.loackArray[i].getComponent("Block").eliminate(true);
|
this.lockArray[i].getComponent("Block").eliminate(true);
|
||||||
|
count -= 1;
|
||||||
|
if (count == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count != 0 && this.lockArray2.length != 0) {
|
||||||
|
for (let i = 0; i < this.lockArray2.length; i++) {
|
||||||
|
// console.log("没有普通快,魔法消除一个带锁块");
|
||||||
|
this.lockArray2[i].getComponent("Block").eliminate(true);
|
||||||
count -= 1;
|
count -= 1;
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
break;
|
break;
|
||||||
|
|
@ -3522,7 +3574,7 @@ export default class MapConroler extends cc.Component {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.wall_Pass[j].special == 3 || this.wall_Pass[j].special == 4 || this.wall_Pass[j].special == 5) {
|
else if (this.wall_Pass[j].special == 3 || this.wall_Pass[j].special == 4 || this.wall_Pass[j].special == 5 || this.wall_Pass[j].special == 6) {
|
||||||
// console.log("冻结门,不可通行");
|
// console.log("冻结门,不可通行");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1285,7 +1285,7 @@ export namespace MiniGameSdk {
|
||||||
if (typeof wx !== 'undefined' && wx !== null) {
|
if (typeof wx !== 'undefined' && wx !== null) {
|
||||||
// console.log("设置用户注册属性");
|
// console.log("设置用户注册属性");
|
||||||
API._ta.userSet({ register_time: time });
|
API._ta.userSet({ register_time: time });
|
||||||
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.uid.toString() });
|
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.userId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1294,7 +1294,7 @@ export namespace MiniGameSdk {
|
||||||
// console.log("上传金币和关卡信息给数数")
|
// console.log("上传金币和关卡信息给数数")
|
||||||
API._ta.userSet({ current_level: (cc.fx.GameConfig.GM_INFO.level + 1) });
|
API._ta.userSet({ current_level: (cc.fx.GameConfig.GM_INFO.level + 1) });
|
||||||
API._ta.userSet({ current_coin: cc.fx.GameConfig.GM_INFO.coin });
|
API._ta.userSet({ current_coin: cc.fx.GameConfig.GM_INFO.coin });
|
||||||
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.uid.toString() });
|
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.userId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1310,7 +1310,7 @@ export namespace MiniGameSdk {
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
|
||||||
user_id: cc.fx.GameConfig.GM_INFO.uid.toString() //用户id
|
user_id: cc.fx.GameConfig.GM_INFO.userId //用户id
|
||||||
};
|
};
|
||||||
if (register_time != null) {
|
if (register_time != null) {
|
||||||
// console.log("设置用户公共属性注册:————————————", register_time);
|
// console.log("设置用户公共属性注册:————————————", register_time);
|
||||||
|
|
@ -1320,7 +1320,7 @@ export namespace MiniGameSdk {
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
||||||
register_time: register_time,
|
register_time: register_time,
|
||||||
user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
|
user_id: cc.fx.GameConfig.GM_INFO.userId, //用户id
|
||||||
pay_user: pay_user
|
pay_user: pay_user
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1331,7 +1331,7 @@ export namespace MiniGameSdk {
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
||||||
user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
|
user_id: cc.fx.GameConfig.GM_INFO.userId, //用户id
|
||||||
pay_user: pay_user
|
pay_user: pay_user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1476,8 +1476,8 @@ export namespace MiniGameSdk {
|
||||||
static shareGame() {
|
static shareGame() {
|
||||||
if (typeof wx !== 'undefined' && wx !== null) {
|
if (typeof wx !== 'undefined' && wx !== null) {
|
||||||
let helpLevel = cc.fx.GameConfig.GM_INFO.level + 1;
|
let helpLevel = cc.fx.GameConfig.GM_INFO.level + 1;
|
||||||
if (helpLevel > 373) {
|
if (cc.fx.GameTool.maxLevel()) {
|
||||||
helpLevel = 373;
|
helpLevel -= 1;
|
||||||
}
|
}
|
||||||
// 获取关卡信息和 UID
|
// 获取关卡信息和 UID
|
||||||
const level = helpLevel;
|
const level = helpLevel;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ export enum WallSpecial {
|
||||||
"旋转门顺时针" = 4,
|
"旋转门顺时针" = 4,
|
||||||
/*旋转门逆时针*/
|
/*旋转门逆时针*/
|
||||||
"旋转门逆时针" = 5,
|
"旋转门逆时针" = 5,
|
||||||
|
/*上锁门*/
|
||||||
|
"上锁门" = 6,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WallType {
|
export enum WallType {
|
||||||
|
|
|
||||||
|
|
@ -398,8 +398,8 @@ var GameTool = {
|
||||||
//关卡上限
|
//关卡上限
|
||||||
maxLevel() {
|
maxLevel() {
|
||||||
let jg = false;
|
let jg = false;
|
||||||
if (cc.fx.GameConfig.GM_INFO.level > 439) {
|
if (cc.fx.GameConfig.GM_INFO.level > 599) {
|
||||||
cc.fx.GameConfig.GM_INFO.level = 440;
|
cc.fx.GameConfig.GM_INFO.level = 600;
|
||||||
jg = true;
|
jg = true;
|
||||||
}
|
}
|
||||||
return jg;
|
return jg;
|
||||||
|
|
@ -1195,31 +1195,8 @@ var GameTool = {
|
||||||
setWechatGameGroup: function (type: 2 | 3 | 6) {
|
setWechatGameGroup: function (type: 2 | 3 | 6) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
if (typeof wx !== 'undefined' && wx !== null) {
|
if (typeof wx !== 'undefined' && wx !== null) {
|
||||||
//@ts-ignore
|
if (cc.fx.GameConfig.GM_INFO.userId) {
|
||||||
if (cc.fx.GameConfig.GM_INFO.openid) {
|
let groupNumber = cc.fx.GameConfig.GM_INFO.userId % type;
|
||||||
const openid = cc.fx.GameConfig.GM_INFO.openid;
|
|
||||||
const lastChar = openid[openid.length - 1];
|
|
||||||
const charCode = lastChar.charCodeAt(0);
|
|
||||||
let groupNumber: number;
|
|
||||||
//console.log("openid尾数____________________:", charCode);
|
|
||||||
|
|
||||||
// 根据 type 参数计算分组编号
|
|
||||||
switch (type) {
|
|
||||||
case 2:
|
|
||||||
groupNumber = charCode % 2;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
groupNumber = charCode % 3;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
groupNumber = charCode % 6;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//console.log('type 参数值无效,必须为 2、3 或 6');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//console.log("type____________________:", type);
|
|
||||||
//console.log("分组编号____________________:", groupNumber);
|
|
||||||
return groupNumber;
|
return groupNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1227,6 +1204,8 @@ var GameTool = {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//购买行为,获得道具
|
//购买行为,获得道具
|
||||||
getShopProp(propData, compensate) {
|
getShopProp(propData, compensate) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
9,
|
9,
|
||||||
12
|
12
|
||||||
],
|
],
|
||||||
"time": 100,
|
"time": 150,
|
||||||
"gap": []
|
"gap": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
11,
|
11,
|
||||||
11
|
11
|
||||||
],
|
],
|
||||||
"time": 200,
|
"time": 240,
|
||||||
"gap": []
|
"gap": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"ver": "1.1.3",
|
|
||||||
"uuid": "2ef5a7c6-04f5-418a-85b6-bf39220cd512",
|
|
||||||
"importer": "folder",
|
|
||||||
"isBundle": false,
|
|
||||||
"bundleName": "",
|
|
||||||
"priority": 1,
|
|
||||||
"compressionType": {},
|
|
||||||
"optimizeHotUpdate": {},
|
|
||||||
"inlineSpriteFrames": {},
|
|
||||||
"isRemoteBundle": {},
|
|
||||||
"subMetas": {}
|
|
||||||
}
|
|
||||||
|
|
@ -391,7 +391,7 @@ export default class NewClass extends cc.Component {
|
||||||
if (this.Stamina && this.Stamina.getChildByName("time")) {
|
if (this.Stamina && this.Stamina.getChildByName("time")) {
|
||||||
this.Stamina.getChildByName("time").getComponent(cc.Label).string = timeTemp;
|
this.Stamina.getChildByName("time").getComponent(cc.Label).string = timeTemp;
|
||||||
}
|
}
|
||||||
MiniGameSdk.API.showToast("恢复一点滴点体力");
|
MiniGameSdk.API.showToast("恢复一点体力");
|
||||||
cc.fx.GameTool.setUserHealth(1, (data) => {
|
cc.fx.GameTool.setUserHealth(1, (data) => {
|
||||||
cc.fx.GameTool.getHealth(null);
|
cc.fx.GameTool.getHealth(null);
|
||||||
this.setHealthInfo(true);
|
this.setHealthInfo(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user