修改分享失败提示

修改分享得魔杖后无法使用锤子
This commit is contained in:
huanghaipeng 2025-10-15 10:24:05 +08:00
parent 04e86ccd4f
commit 058cdfc88a
2 changed files with 7 additions and 2 deletions

View File

@ -2689,7 +2689,7 @@ export default class MapConroler extends cc.Component {
return;
}
this.lastHammerTime = Date.now();
if ((this.magicMask.active == true && this.magicMask.opacity == 254) || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
if ((this.magicMask.active == true && this.magicMask.opacity == 255) || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
return;
}
let hammerBtn = this.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
@ -2866,8 +2866,8 @@ export default class MapConroler extends cc.Component {
}
const timestamp = Date.now();
this.magicMask.active = true;
this.magicMask.opacity = 254;
setTimeout(() => {
this.magicMask.opacity = 254;
// this.magicMask.active = true; ////false
// magicBtn.getComponent("btnControl").setTouch(true);
cc.fx.GameTool.setGray(this.magicBtn.node, true);

View File

@ -1361,6 +1361,11 @@ var GameTool = {
console.log('分享失败');
// callback(false); // 回调表示分享失败
wx.showToast({
title: '请分享给爱玩游戏的朋友,感谢!',
icon: 'none',
duration: 2000
});
};
if (cc.sys.platform === cc.sys.WECHAT_GAME) {