From caa9b232cd61724ce2569b02de2777e0297a28a2 Mon Sep 17 00:00:00 2001 From: huanghaipeng Date: Mon, 19 Jan 2026 10:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A0=E5=B0=BD=E5=85=B3?= =?UTF-8?q?=E5=8D=A10=E4=BD=93=E5=8A=9B=E5=90=8E=E8=BF=98=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E7=BB=A7=E7=BB=AD=E6=B8=B8=E6=88=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/JiaZai.ts | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 55501f0..941b7b9 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -963,6 +963,23 @@ export default class JiaZai extends cc.Component { } cc.fx.AudioManager._instance.playEffect("anniu_Big", null); let version = cc.fx.GameTool.getWechatGameVersion(); + + let power = cc.fx.GameTool.getUserPowerTime(); + if (cc.fx.GameConfig.GM_INFO.hp < 1 && power == false) { + MiniGameSdk.API.showToast("体力值不足"); + setTimeout(() => { + this.openHeath(); + }, 500); + return; + } + //@ts-ignore + if (typeof wx !== 'undefined') { + //@ts-ignore + wx.offShow(this.onShowListener); + //@ts-ignore + wx.offHide(this.onHideListener); + } + if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.otherLevel == 0) { // if (version != "开发版" && version != "体验版") { // MiniGameSdk.API.showToast("关卡每周更新,敬请期待!"); @@ -1004,22 +1021,6 @@ export default class JiaZai extends cc.Component { // } } - let power = cc.fx.GameTool.getUserPowerTime(); - if (cc.fx.GameConfig.GM_INFO.hp < 1 && power == false) { - MiniGameSdk.API.showToast("体力值不足"); - setTimeout(() => { - this.openHeath(); - }, 500); - return; - } - //@ts-ignore - if (typeof wx !== 'undefined') { - //@ts-ignore - wx.offShow(this.onShowListener); - //@ts-ignore - wx.offHide(this.onHideListener); - } - if (this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl")._touch) { this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl").setTouch(false); let version = cc.fx.GameTool.getWechatGameVersion();