소스 검색

接入广告完成

lichao 7 달 전
부모
커밋
ed1a112fcb
1개의 변경된 파일20개의 추가작업 그리고 7개의 파일을 삭제
  1. 20 7
      assets/scripts/game_main.ts

+ 20 - 7
assets/scripts/game_main.ts

@@ -148,13 +148,6 @@ export default class NewClass extends cc.Component {
     }
     onRewardedVideoAdPlayEnd(placementId, callbackInfo) {
         ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")");
-    }
-    onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo) {
-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")");
-    }
-    onRewardedVideoAdClosed(placementId, callbackInfo) {
-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
-
 
         let customerOption = cc.sys.localStorage.getItem("customerOption");
         if (customerOption === "shuffle") {
@@ -169,6 +162,26 @@ export default class NewClass extends cc.Component {
 
         this.updateItemView()
 
+    }
+    onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo) {
+        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")");
+    }
+    onRewardedVideoAdClosed(placementId, callbackInfo) {
+        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
+
+        // let customerOption = cc.sys.localStorage.getItem("customerOption");
+        // if (customerOption === "shuffle") {
+        //     global_model.game.shuffle_counter++
+        // } else if (customerOption === "revoke") {
+        //     global_model.game.undo_counter++
+        // } else if (customerOption === "auto") {
+        //     global_model.game.hint_tip_counter++
+        // } else if (customerOption === "clearTopThree") {
+        //     global_model.game.move_up_counter++
+        // }
+
+        // this.updateItemView()
+
     }
     onRewardedVideoAdPlayClicked(placementId, callbackInfo) {
         ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")");