Jelajahi Sumber

【BUG】完善通关弹窗看广告不进入下一关问题,完善提现记录展示问题

mojunshou 7 bulan lalu
induk
melakukan
dca3af5765

+ 3 - 1
assets/bundle/gui/eliminate/eliminate.prefab

@@ -6218,6 +6218,8 @@
       "__id__": 0
     },
     "fileId": "8djaLKMGJGWKF9SshoBS23",
+    "instance": null,
+    "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
   {
@@ -9515,7 +9517,7 @@
         "__id__": 386
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 392

+ 1 - 0
assets/bundle/gui/eliminate/prefab/withdrawalRecord.prefab

@@ -1937,6 +1937,7 @@
     },
     "fileId": "34qepRVwVJGrVhlJc5UFWU",
     "instance": null,
+    "targetOverrides": null,
     "nestedPrefabInstanceRoots": [
       {
         "__id__": 28

+ 7 - 3
assets/script/game/common/manager/ServerHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:16:41
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-16 18:58:27
+ * @LastEditTime: 2025-04-17 16:29:07
  * @Description: 
  */
 // ServerHandler.ts
@@ -364,10 +364,14 @@ export class ServerHandler {
             account.hbCoin = props['1004'];
             game.changeHbCoin = changes['1004'];
             game.changeWxCoin = changes['1005'];
+            //是不是通关奖励点击的
+            if (smc.game.GameModel.viewType == "pass_reward") {
+                //下一关
+                smc.game.GameModel.viewType = "";
+                this.getNextLevel();
+            }
             oops.message.dispatchEvent(GameEvent.showCoinAnimation);
-            //还要知道是不是二倍速的
         }
-        //保存需要下发的数值
     }
 
 

+ 0 - 3
assets/script/game/view/CashWithdrawalView.ts

@@ -42,7 +42,6 @@ export class CashWithdrawalView extends GameComponent {
         this.mainNode.active = false;
         this.loadNode.active = false;
         const num = smc.game.GameModel.txNum;
-        console.log(">>>>>>>>>>>金钱数量", num)
         if (num > 0) {
             if (this.lab_cashNum) {
                 this.lab_cashNum.string = `¥${num}`;
@@ -71,8 +70,6 @@ export class CashWithdrawalView extends GameComponent {
         if (this.loadNode && this.loadProgressBar) {
             this.loadProgressBar.progress = 0;
             this.loadNode.active = true;
-            // 创建中间变量对象
-            console.log("显示加载")
             const progressObj = { value: 0 };
             tween(progressObj)
                 .to(2, { value: 1 }, {

+ 7 - 7
assets/script/game/view/EliminateViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:01:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-17 15:58:53
+ * @LastEditTime: 2025-04-17 16:14:26
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -149,9 +149,9 @@ export class EliminateViewComp extends CCComp {
     private callback: Function | null = null; //回调函数
 
     //tween时间控制变量
-    private autoMoveTime: number = 0.4;
-
-
+    private autoMoveTime: number = 0.4;  //自动移动时间
+    //再次自动放置间隔时间
+    private autoPlaceInterval: number = 0.4;
 
     //没使用颜色
     notUseColor = new Color(255, 255, 255, 255)
@@ -1940,9 +1940,9 @@ export class EliminateViewComp extends CCComp {
                                 this.gameOver()
                             } else if (this.autoState) {
                                 // 继续自动放置
-                                // this.scheduleOnce(() => {
-                                //     this.executeAutoPlace()
-                                // }, 0.3)
+                                this.scheduleOnce(() => {
+                                    this.executeAutoPlace()
+                                }, this.autoPlaceInterval)
                             }
                         })
                     })

+ 5 - 4
assets/script/game/view/GamePassView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 14:43:24
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-16 19:01:08
+ * @LastEditTime: 2025-04-17 16:31:57
  * @Description: 游戏通关弹窗
  */
 import { Label, Node } from 'cc';
@@ -78,17 +78,17 @@ export class GamePassView extends GameComponent {
         oops.gui.remove(UIID.GamePass);
         //给服务器发信息--少量领取
         ServerHandler.inst.getPassRewards();
-
-        //我要不要展示提现点,
     }
 
     //十倍领取
     private btn_more() {
         this.isAuto = false;
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            smc.game.GameModel.viewType = "double_reward";
+            smc.game.GameModel.viewType = "pass_reward";
             console.log("十倍领取", smc.game.GameModel.viewType);
             ADHandler.inst.showAd(AD_TYPE.Pass_Receive);
+            //打开等待
+            // oops.gui.waitOpen();
             oops.gui.remove(UIID.GamePass);
         } else {
             oops.gui.remove(UIID.GamePass);
@@ -99,6 +99,7 @@ export class GamePassView extends GameComponent {
     //设置自动领取
     setAutoReceive() {
         let time = this.time;
+        this.lab_tips.string = `${time}秒后自动领取`;
         this.callback = function () {
             this.lab_tips.string = `${time}秒后自动领取`;
             time--;

+ 7 - 1
assets/script/game/view/WithdrawalRecordViewComp.ts

@@ -89,7 +89,7 @@ export class WithdrawalRecordViewComp extends CCComp {
         if (timeLabel) timeLabel.string = data.createTime;
 
         const moneyLabel = item.getChildByName("lab_money")?.getComponent(Label);
-        if (moneyLabel) moneyLabel.string = data.amount + "元";
+        if (moneyLabel) moneyLabel.string = this.formatNumber(data.amount / 100) + "元";
         //TS原生随机数0 或者1
         const statusNode1 = item.getChildByName("record_state1");
         if (statusNode1) statusNode1.active = data.status == 2;
@@ -107,4 +107,10 @@ export class WithdrawalRecordViewComp extends CCComp {
         this.node.destroy();
     }
 
+
+    //保留两位小数
+    formatNumber(num: number) {
+        return Math.round(num * 100) / 100;
+    }
+
 }