This commit is contained in:
YZ\249929363 2025-07-08 17:23:08 +08:00
commit 7cf729f994

View File

@ -1668,15 +1668,15 @@ export default class MapConroler extends cc.Component {
if (freezeBtn.getComponent("btnControl")._touch) {
freezeBtn.getComponent("btnControl").setTouch(false);
if (cc.fx.GameConfig.GM_INFO.freezeAmount < 1) {
if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
MiniGameSdk.API.showToast("金币不足,无法购买道具");
setTimeout(() => {
this.openShop();
freezeBtn.getComponent("btnControl").setTouch(true);
}, 500);
// if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
// MiniGameSdk.API.showToast("金币不足,无法购买道具");
// setTimeout(() => {
// this.openShop();
// freezeBtn.getComponent("btnControl").setTouch(true);
// }, 500);
return;
}
// return;
// }
this.node.parent.parent.getChildByName("propWindow").active = true;
this.node.parent.parent.parent.getComponent("SceneManager").openPropBuy("freeze");
}
@ -1797,15 +1797,15 @@ export default class MapConroler extends cc.Component {
if (hammerBtn.getComponent("btnControl")._touch) {
hammerBtn.getComponent("btnControl").setTouch(false);
if (cc.fx.GameConfig.GM_INFO.hammerAmount < 1) {
if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
MiniGameSdk.API.showToast("金币不足,无法购买道具");
setTimeout(() => {
this.openShop();
hammerBtn.getComponent("btnControl").setTouch(true);
}, 500);
// if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
// MiniGameSdk.API.showToast("金币不足,无法购买道具");
// setTimeout(() => {
// this.openShop();
// hammerBtn.getComponent("btnControl").setTouch(true);
// }, 500);
return;
}
// return;
// }
this.node.parent.parent.getChildByName("propWindow").active = true;
this.node.parent.parent.parent.getComponent("SceneManager").openPropBuy("hammer");
}
@ -1897,15 +1897,15 @@ export default class MapConroler extends cc.Component {
if (magicBtn.getComponent("btnControl")._touch) {
magicBtn.getComponent("btnControl").setTouch(false);
if (cc.fx.GameConfig.GM_INFO.magicAmount < 1) {
if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
MiniGameSdk.API.showToast("金币不足,无法购买道具");
setTimeout(() => {
this.openShop();
magicBtn.getComponent("btnControl").setTouch(true);
}, 500);
// if (cc.fx.GameConfig.GM_INFO.coin < 1500) {
// MiniGameSdk.API.showToast("金币不足,无法购买道具");
// setTimeout(() => {
// this.openShop();
// magicBtn.getComponent("btnControl").setTouch(true);
// }, 500);
return;
}
// return;
// }
this.node.parent.parent.getChildByName("propWindow").active = true;
this.node.parent.parent.parent.getComponent("SceneManager").openPropBuy("magic");
// MiniGameSdk.API.showToast("魔法棒数量不足,自动购买魔法棒");