diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index fca5fd9..04b5466 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -306,6 +306,12 @@ stopHeathTimeCutDown() { this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false); cc.fx.GameConfig.LEVEL_INFO_init(true, 1000); } + else{ + cc.fx.AudioManager._instance.playEffect("zhuan1", null); + this.node.getChildByName("zhuanchang").active = true; + this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false); + cc.fx.GameConfig.LEVEL_INFO_init(true, 1000); + } } diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index de8f849..df269ff 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -961,17 +961,20 @@ var GameTool = { getWechatGameVersion: function(){ //@ts-ignore - const accountInfo = wx.getAccountInfoSync(); - const miniProgram = accountInfo.miniProgram; - switch (miniProgram.envVersion) { - case 'develop': - return '开发版'; - case 'trial': - return '体验版'; - case 'release': - return '正式版'; - default: - return '未知版本'; + if (typeof wx!== 'undefined' && wx!== null) { + //@ts-ignore + const accountInfo = wx.getAccountInfoSync(); + const miniProgram = accountInfo.miniProgram; + switch (miniProgram.envVersion) { + case 'develop': + return '开发版'; + case 'trial': + return '体验版'; + case 'release': + return '正式版'; + default: + return '未知版本'; + } } },