ソースを参照

优化红包看广告

zouyong 5 年 前
コミット
83a096008d

+ 2 - 2
assets/resources/module/redBagCash/texture/close.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 53,
-  "height": 49,
+  "width": 88,
+  "height": 88,
   "platformSettings": {},
   "subMetas": {
     "close": {

+ 7 - 20
assets/script/game/module/reward/Reward.ts

@@ -131,27 +131,14 @@ export default class Reward extends cc.Component {
                 }
             });
         } else {
-            // 幸运红包
-            if (gData.reward.subType === 1) {
-                // 主界面气泡 | 关卡气泡
-                mk.ad.watchAd((success: boolean) => {
-                    mk.console.log("watchAD:" + success);
-                    if (success) {
-                        gData.adData.watchVideo(AdFun.bubble);
-                    }
-                });
-            } else if (gData.reward.subType === 2) {
-                // 关卡消除
-                mk.ad.watchAd((success: boolean) => {
-                    mk.console.log("watchAD:" + success);
-                    if (success) {
-                        gData.adData.watchVideo(AdFun.checkpoint);
-                    }
-                });
-            }
+            mk.ad.watchAd((success: boolean) => {
+                mk.console.log("watchAD:" + success);
+                if (success) {
+                    gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble);
+                    gData.reward.subType = null;
+                }
+            });
         }
-        // 测试数据
-        // gData.reward.adData = gData.reward.data;
     }
 
     /**