道具购买弹窗修改

This commit is contained in:
computer\尼卡 2025-07-08 17:21:34 +08:00
parent 94f976b1f9
commit c1ad245b17

View File

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