Compare commits

..

No commits in common. "e7184691eb58ed40ab8662faaddda13f43820610" and "9f754a3764ad03ae906fb635a11fe011698bdaed" have entirely different histories.

2 changed files with 10 additions and 20 deletions

View File

@ -1346,9 +1346,8 @@ export default class MapConroler extends cc.Component {
if (this.blockNum == 0 && !this.gameWin && !this.gameOver) {
// alert("游戏成功");
MiniGameSdk.API.showToast(cc.fx.GameConfig.GM_INFO.level);
this.gameWin = true;
console.log("恢复一点体力",cc.fx.GameConfig.GM_INFO.level);
console.log("恢复一点体力")
cc.fx.GameTool.setUserHealth(1, (data) => {
})
this.stopTimeCutDown();
@ -1391,6 +1390,7 @@ export default class MapConroler extends cc.Component {
}
winLevel() {
if(this.node.parent.parent.getChildByName("Win").
getChildByName("nextBtn").getComponent("btnControl")._touch == false){
return;
@ -1398,18 +1398,9 @@ export default class MapConroler extends cc.Component {
this.node.parent.parent.getChildByName("Win").
getChildByName("nextBtn").getComponent("btnControl").setTouch(false);
cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
console.log("下一关",cc.fx.GameConfig.GM_INFO.level);
if (cc.fx.GameConfig.GM_INFO.level > 249) {
cc.fx.GameConfig.GM_INFO.level = 249;
MiniGameSdk.API.showToast("每周更新,敬请期待!");
setTimeout(() => {
this.node.parent.parent.getChildByName("Win").
getChildByName("nextBtn").getComponent("btnControl").setTouch(true);
}, 500);
}
else if (cc.fx.GameConfig.GM_INFO.level == 249) {
MiniGameSdk.API.showToast("每周更新,敬请期待!");
}
else {
// console.log("下一关");
@ -1758,8 +1749,8 @@ export default class MapConroler extends cc.Component {
setTimeout(() => {
this.setPropNum();
// this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
MiniGameSdk.API.showToast("购买冻结时间成功");
}, 2000);
MiniGameSdk.API.showToast("购买冻结时间道具成功");
}, 200);
}
@ -1771,14 +1762,14 @@ export default class MapConroler extends cc.Component {
cc.fx.StorageMessage.setStorage("prop", propInfo);
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
setTimeout(() => {
MiniGameSdk.API.showToast("购买魔法棒成功");
MiniGameSdk.API.showToast("购买锤子道具成功");
this.setPropNum();
// this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
}, 2000);
}, 200);
}
else if (data == "hammerAmount") {
cc.fx.GameConfig.GM_INFO.hammerAmount += 1;
cc.fx.GameConfig.GM_INFO.hammerAmount += 3;
let propInfo = cc.fx.StorageMessage.getStorage("prop");
propInfo.hammerAmount = cc.fx.GameConfig.GM_INFO.hammerAmount;
propInfo.timestamp = timestamp;
@ -1787,8 +1778,8 @@ export default class MapConroler extends cc.Component {
setTimeout(() => {
this.setPropNum();
// this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
MiniGameSdk.API.showToast("购买锤子成功");
}, 2000);
MiniGameSdk.API.showToast("购买魔法棒道具成功");
}, 200);
}
@ -1861,7 +1852,7 @@ export default class MapConroler extends cc.Component {
}
buyHammer() {
if (cc.fx.GameConfig.GM_INFO.coin < 1000) {
if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
MiniGameSdk.API.showToast("金币不足,无法购买道具");
setTimeout(() => {
this.openShop();

View File

@ -288,7 +288,6 @@ export default class SceneManager extends cc.Component {
openPropBuy(name) {
MapConroler._instance.pause = true;
MapConroler._instance.stopBoom();
this.btnName = name;
let propWindow = this.node.getChildByName("Game").getChildByName("propWindow");
propWindow.active = true;