| 
														
															@@ -3,9 +3,9 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @file 游戏控制 
														 | 
														
														 | 
														
															  * @file 游戏控制 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import   ATSDK  from "./AnyThinkAds/ATJSSDK"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import  ATRewardedVideoSDK  from "./AnyThinkAds/ATRewardedVideoJSSDK";  
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import   AAJS2  from "./ATAndroidJS2"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import ATSDK from "./AnyThinkAds/ATJSSDK"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import ATRewardedVideoSDK from "./AnyThinkAds/ATRewardedVideoJSSDK"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import AAJS2 from "./ATAndroidJS2"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import AESUtil from "./AESUtil" 
														 | 
														
														 | 
														
															 import AESUtil from "./AESUtil" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 var AC = require('GameAct') 
														 | 
														
														 | 
														
															 var AC = require('GameAct') 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -14,7 +14,9 @@ var yxAdMark = 'yxAdMark' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /** 
														 | 
														
														 | 
														
															 /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * AD播放完毕标识 
														 | 
														
														 | 
														
															  * AD播放完毕标识 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-var adPalyOverEve='adPalyOverEve' 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+var adPalyOverEve_ = 'adPalyOverEve' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+var state = false;//AD  专用的 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 cc.Class({ 
														 | 
														
														 | 
														
															 cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   extends: cc.Component, 
														 | 
														
														 | 
														
															   extends: cc.Component, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -28,7 +30,7 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     revivePage: cc.Node, 
														 | 
														
														 | 
														
															     revivePage: cc.Node, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  onLoad () { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onLoad() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh:1111game.js onload...') 
														 | 
														
														 | 
														
															     console.log('zh:1111game.js onload...') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     cc.sys.localStorage.removeItem(yxAdMark) 
														 | 
														
														 | 
														
															     cc.sys.localStorage.removeItem(yxAdMark) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.yxAdEventInit(); 
														 | 
														
														 | 
														
															     this.yxAdEventInit(); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -38,21 +40,26 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh:game.js start...') 
														 | 
														
														 | 
														
															     console.log('zh:game.js start...') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh: ad over 开始测试发送事件s') 
														 | 
														
														 | 
														
															     console.log('zh: ad over 开始测试发送事件s') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    this.node.emit(adPalyOverEve, 'test'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    this.node.emit(adPalyOverEve_, 'test'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh: ad over 开始测试发送事件e') 
														 | 
														
														 | 
														
															     console.log('zh: ad over 开始测试发送事件e') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.bindNode() 
														 | 
														
														 | 
														
															     this.bindNode() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.generatePool() 
														 | 
														
														 | 
														
															     this.generatePool() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.loadRes() 
														 | 
														
														 | 
														
															     this.loadRes() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.initAd() 
														 | 
														
														 | 
														
															     this.initAd() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    setTimeout(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.initAdForPage(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    }, 300); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   //ad相关的事件初始化 
														 | 
														
														 | 
														
															   //ad相关的事件初始化 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  yxAdEventInit(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  yxAdEventInit() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     let that = this; 
														 | 
														
														 | 
														
															     let that = this; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    this.node.on(adPalyOverEve, function (msg) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      console.log('zh:接收到事件调用adPalyOverEve  msg='+msg); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      switch(msg){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    this.node.on(adPalyOverEve_, function (msg) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      console.log('zh:接收到事件调用adPalyOverEve  msg=' + msg); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      switch (msg) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         case 'AdClosed': 
														 | 
														
														 | 
														
															         case 'AdClosed': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           console.log('zh:ad over AdClosed') 
														 | 
														
														 | 
														
															           console.log('zh:ad over AdClosed') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           break; 
														 | 
														
														 | 
														
															           break; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -64,163 +71,175 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           break; 
														 | 
														
														 | 
														
															           break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }); 
														 | 
														
														 | 
														
															     }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-// 看完了广告那么就要发放奖励(道具) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  yxAdPlayEndAction(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  initAdForPage() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:game.js initAdForPage start') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    let deviceId = AAJS2.getDeviceUserId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log("zh:checkstatus:", ATRewardedVideoSDK.checkAdStatus(AAJS2.getPlacementID())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    var setting = {}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    setting[ATRewardedVideoSDK.userIdKey] = deviceId; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATRewardedVideoSDK.loadRewardedVideo(AAJS2.getPlacementID(), setting); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // 看完了广告那么就要发放奖励(道具) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  yxAdPlayEndAction() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     let mark = cc.sys.localStorage.getItem(yxAdMark);//看广告用于 xx 标记 
														 | 
														
														 | 
														
															     let mark = cc.sys.localStorage.getItem(yxAdMark);//看广告用于 xx 标记 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log('zh:yxAdMark='+mark); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    switch(mark){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     case 'fuHuo'://复活 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       console.log('zh:因为你看完了AD,所以开始发放复活道具') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       this.showReviveSuccess() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       break; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     default: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       console.log('zh:没有找到yxAdMark 相关的信息!!!!!!!') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       break; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:yxAdMark=' + mark); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    switch (mark) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      case 'fuHuo'://复活 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        console.log('zh:因为你看完了AD,所以开始发放复活道具') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        this.showReviveSuccess() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //this.askRevive() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      default: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        console.log('zh:没有找到yxAdMark 相关的信息!!!!!!!') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.clearAdMark(); 
														 | 
														
														 | 
														
															     this.clearAdMark(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   /** 
														 | 
														
														 | 
														
															   /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    * 清除AD 奖励标识 
														 | 
														
														 | 
														
															    * 清除AD 奖励标识 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    */ 
														 | 
														
														 | 
														
															    */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  clearAdMark(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  clearAdMark() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     cc.sys.localStorage.removeItem(yxAdMark) 
														 | 
														
														 | 
														
															     cc.sys.localStorage.removeItem(yxAdMark) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-   //#region "AD  监听start" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    onRewardedVideoAdLoaded(placementId) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdLoaded(" + placementId + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdFailed (placementId, errorInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     //   BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      //  BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       //测试AD  事件 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // console.log('zh: ad over 开始发送事件aaaa') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // this.node.emit("handleCustomEvent"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // console.log('zh: ad over 开始发送事件bbb') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdPlayStart (placementId, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        let deviceId = AAJS2.getDeviceUserId(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        var setting = {}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        setting[ATRewardedVideoSDK.userIdKey] = deviceId; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATRewardedVideoSDK.loadRewardedVideo(AAJS2.getPlacementID(),setting); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdPlayEnd (placementId, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //that.retrive(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       //  BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-       //  BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        console.log('zh: ad onRewardedVideoAdPlayEnd 开始发送事件s') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        this.node.emit(adPalyOverEve, 'AdPlayEnd'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        console.log('zh: ad onRewardedVideoAdPlayEnd 发送事件e') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdPlayFailed (placementId, errorInfo, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      //  BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     //   BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdClosed (placementId, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        console.log("onRewardxxxxxxclosed",this.state); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        console.log("zh:onRewardxxxxxxclosed",this.state); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if(this.state==true){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          console.log('zh: ad onRewardedVideoAdClosed 开始发送事件s') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this.node.emit(adPalyOverEve, 'AdClosed'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          console.log('zh: ad onRewardedVideoAdClosed 发送事件e') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this.state = false; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        }else{ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this.state = false; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onRewardedVideoAdPlayClicked (placementId, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     onReward (placementId, callbackInfo) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ATSDK.printLog("AnyThinkRewardedVideoDemo::onReward(" + placementId + ", " + callbackInfo + ")"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        console.log("onRewardxxxxxx"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //BrickMsger.emit(BrickMsger.on_game_revie); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        this.state = true; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //#endregion "AD  监听end" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    /** 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     * 初始化广告 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     */ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  initAd(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  //#region "AD  监听start" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdLoaded(placementId) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdLoaded') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdLoaded(" + placementId + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdFailed(placementId, errorInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdFailed') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //  BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //测试AD  事件 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // console.log('zh: ad over 开始发送事件aaaa') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // this.node.emit("handleCustomEvent"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // console.log('zh: ad over 开始发送事件bbb') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdPlayStart(placementId, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdPlayStart') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    let deviceId = AAJS2.getDeviceUserId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    var setting = {}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    setting[ATRewardedVideoSDK.userIdKey] = deviceId; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATRewardedVideoSDK.loadRewardedVideo(AAJS2.getPlacementID(), setting); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdPlayEnd(placementId, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdPlayEnd') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //that.retrive(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //  BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //  BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh: ad onRewardedVideoAdPlayEnd 开始发送事件s') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    this.node.emit(adPalyOverEve_, 'AdPlayEnd'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh: ad onRewardedVideoAdPlayEnd 发送事件e') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdPlayFailed') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //  BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   BrickMsger.emit(BrickMsger.on_changeto_start); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdClosed(placementId, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdClosed') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log("onRewardxxxxxxclosed", this.state); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log("zh:onRewardxxxxxxclosed", this.state); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if (this.state == true) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      console.log('zh: ad onRewardedVideoAdClosed 开始发送事件s') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.node.emit(adPalyOverEve_, 'AdClosed'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      console.log('zh: ad onRewardedVideoAdClosed 发送事件e') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.state = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.state = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onRewardedVideoAdPlayClicked(placementId, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onRewardedVideoAdPlayClicked') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  onReward(placementId, callbackInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:onReward') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.printLog("AnyThinkRewardedVideoDemo::onReward(" + placementId + ", " + callbackInfo + ")"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log("onRewardxxxxxx"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //BrickMsger.emit(BrickMsger.on_play_sound, 1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //BrickMsger.emit(BrickMsger.on_game_revie); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    this.state = true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  //#endregion "AD  监听end" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+   * 初始化广告 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+   */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  initAd() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh:AD   init start') 
														 | 
														
														 | 
														
															     console.log('zh:AD   init start') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     let placementID = AAJS2.getPlacementID(); 
														 | 
														
														 | 
														
															     let placementID = AAJS2.getPlacementID(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     let deviceId = AAJS2.getDeviceUserId(); 
														 | 
														
														 | 
														
															     let deviceId = AAJS2.getDeviceUserId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     var setting = {}; 
														 | 
														
														 | 
														
															     var setting = {}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     setting[ATRewardedVideoSDK.userIdKey] = deviceId; 
														 | 
														
														 | 
														
															     setting[ATRewardedVideoSDK.userIdKey] = deviceId; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    ATRewardedVideoSDK.loadRewardedVideo(placementID,setting); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATRewardedVideoSDK.loadRewardedVideo(placementID, setting); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //console.log('zh:bbb222') 
														 | 
														
														 | 
														
															     //console.log('zh:bbb222') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     var customPlacementId = ""; 
														 | 
														
														 | 
														
															     var customPlacementId = ""; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    if (cc.sys.os === cc.sys.OS_IOS) {    
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        customPlacementId =placementID; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if (cc.sys.os === cc.sys.OS_IOS) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      customPlacementId = placementID; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } else if (cc.sys.os === cc.sys.OS_ANDROID) { 
														 | 
														
														 | 
														
															     } else if (cc.sys.os === cc.sys.OS_ANDROID) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        customPlacementId = placementID; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      customPlacementId = placementID; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     // 初始化SDK 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     //ATSDK.initSDK("h67161678d3fcf", "aa0e53109399d0c3a213140e896bdac07");//正式的,发布提交go0gle play 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     //ATSDK.initSDK("h66f7c5f8028cf", "ab133deec743a4bb58930891fd75d3f83");//测试专用,可以显示广告 ???       
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     ATSDK.initSDK("h67122e47607cd", "a4fd9a23bdd71c2314cf41140a77abb1e");//这是cccc线上的 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     ATSDK.setLogDebug(true); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     var GDPRLevel = ATSDK.getGDPRLevel(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    var state = false; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // 初始化SDK 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //ATSDK.initSDK("h67161678d3fcf", "aa0e53109399d0c3a213140e896bdac07");//正式的,发布提交go0gle play 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //ATSDK.initSDK("h66f7c5f8028cf", "ab133deec743a4bb58930891fd75d3f83");//测试专用,可以显示广告 ???       
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.initSDK("h67122e47607cd", "a4fd9a23bdd71c2314cf41140a77abb1e");//这是cccc线上的 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.setLogDebug(true); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    var GDPRLevel = ATSDK.getGDPRLevel(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //var state = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //  const listener = { 
														 | 
														
														 | 
														
															     //  const listener = { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //     //。。。。。。。。 
														 | 
														
														 | 
														
															     //     //。。。。。。。。 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     //  }; 
														 | 
														
														 | 
														
															     //  }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     // 针对欧盟地区初始化时做的处理,按需求打开,不在欧盟地区发布的不用使用。 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     ATSDK.getUserLocation(function (userLocation) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         //如果处于欧盟地区且等级是UNKNOW时,就执行授权弹窗 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         if (userLocation === ATSDK.kATUserLocationInEU) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             if(ATSDK.getGDPRLevel() === ATSDK.UNKNOWN) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                 ATSDK.showGDPRAuth(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     }); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-     ATRewardedVideoSDK.setAdListener(this);         
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // 针对欧盟地区初始化时做的处理,按需求打开,不在欧盟地区发布的不用使用。 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATSDK.getUserLocation(function (userLocation) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      //如果处于欧盟地区且等级是UNKNOW时,就执行授权弹窗 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (userLocation === ATSDK.kATUserLocationInEU) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (ATSDK.getGDPRLevel() === ATSDK.UNKNOWN) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          ATSDK.showGDPRAuth(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    ATRewardedVideoSDK.setAdListener(this); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (cc.sys.os === cc.sys.OS_ANDROID) { 
														 | 
														
														 | 
														
															     if (cc.sys.os === cc.sys.OS_ANDROID) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        setTimeout(() => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            var  allInfo = AAJS2.allInfo(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ATSDK.printLog("zh:allInfo="+allInfo ); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            let key = "US2%*c3lv8sYkUe(!e-6g$E*RJg)dzn@"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            let iv = "Jn0.aWsOu$y-Dbqb"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            let data = {data: AESUtil.AESencrypt(allInfo,key,iv)}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ATSDK.printLog("zh:allInfo-jm="+JSON.stringify(data) ); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            AAJS2.makePostRequestWithXhr(JSON.stringify(data)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        }, 300); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      console.log('zh:AD   init end') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      setTimeout(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        var allInfo = AAJS2.allInfo(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        ATSDK.printLog("zh:allInfo=" + allInfo); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let key = "US2%*c3lv8sYkUe(!e-6g$E*RJg)dzn@"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let iv = "Jn0.aWsOu$y-Dbqb"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let data = { data: AESUtil.AESencrypt(allInfo, key, iv) }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        ATSDK.printLog("zh:allInfo-jm=" + JSON.stringify(data)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        AAJS2.makePostRequestWithXhr(JSON.stringify(data)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      }, 300); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:AD   init end') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-   
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   loadRes() { 
														 | 
														
														 | 
														
															   loadRes() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -279,9 +298,9 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       this.checkMgr.init(this) 
														 | 
														
														 | 
														
															       this.checkMgr.init(this) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       setTimeout(() => { 
														 | 
														
														 | 
														
															       setTimeout(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          resolve('200 OK'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this.checkMgr.elementCheck(this) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        }, self._controller.config.json.startAnimationTime * num / 2 / 1 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        resolve('200 OK'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        this.checkMgr.elementCheck(this) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      }, self._controller.config.json.startAnimationTime * num / 2 / 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //  (cc.game.getFrameRate() / 60) 
														 | 
														
														 | 
														
															         //  (cc.game.getFrameRate() / 60) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ) 
														 | 
														
														 | 
														
															       ) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }) 
														 | 
														
														 | 
														
															     }) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -292,11 +311,11 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       clearTimeout(this.checkNeedFallTimer) 
														 | 
														
														 | 
														
															       clearTimeout(this.checkNeedFallTimer) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.checkNeedFallTimer = setTimeout(() => { 
														 | 
														
														 | 
														
															     this.checkNeedFallTimer = setTimeout(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (this._status == 5) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this._status = 4 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          this.onFall() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      }, 300 / 1 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (this._status == 5) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        this._status = 4 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        this.onFall() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    }, 300 / 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       // (cc.game.getFrameRate() / 60) 
														 | 
														
														 | 
														
															       // (cc.game.getFrameRate() / 60) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ) 
														 | 
														
														 | 
														
															     ) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -355,6 +374,7 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   // todo 复活 
														 | 
														
														 | 
														
															   // todo 复活 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   askRevive() { 
														 | 
														
														 | 
														
															   askRevive() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:askRevive 1') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this._controller.pageManager.addPage(2) 
														 | 
														
														 | 
														
															     this._controller.pageManager.addPage(2) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this._controller.pageManager.addPage(5) 
														 | 
														
														 | 
														
															     this._controller.pageManager.addPage(5) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.revivePage.active = true 
														 | 
														
														 | 
														
															     this.revivePage.active = true 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -368,48 +388,55 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (this.reviveTimer) { 
														 | 
														
														 | 
														
															     if (this.reviveTimer) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       clearInterval(this.reviveTimer) 
														 | 
														
														 | 
														
															       clearInterval(this.reviveTimer) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    this.reviveTimer = setInterval(() => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      if (+numLabel.string > 0) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        numLabel.string-- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        this.rangeSprite.fillRange = 1 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      } else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        this.onSkipRevive() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }, 1000) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // this.reviveTimer = setInterval(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   console.log('zh:timer ...') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   if (+numLabel.string > 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //     numLabel.string-- 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //     this.rangeSprite.fillRange = 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //     console.log('zh:askRevive 2') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //     this.onSkipRevive() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // }, 1000) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   onReviveButton() { 
														 | 
														
														 | 
														
															   onReviveButton() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log('zh:点击复活按钮1') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log('zh: 复活BUT 开始测试发送事件1s') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    this.node.emit(adPalyOverEve, 'AdPlayEnd'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log('zh: 复活BUT 开始测试发送事件e') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // setTimeout(()=>{ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   let placementID = AAJS2.getPlacementID(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   if(ATRewardedVideoSDK.hasAdReady(placementID)){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //       cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //       ATRewardedVideoSDK.showAd(placementID); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   }else{ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //     cc.sys.localStorage.setItem(yxAdMark, ''); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //     console.log('zh:AD 没有准备好') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // },300) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh:点击复活按钮3') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // let testMark = false;//无限复活 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // if(testMark){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   clearInterval(this.reviveTimer) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   this.isRangeAction = false 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   if (this._controller.social.node.active) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //     this._controller.social.onReviveButton(1) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   } else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //     this.showReviveSuccess() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //   } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    // } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // console.log('zh: 复活BUT 开始测试发送事件s') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // this.node.emit(adPalyOverEve_, 'AdPlayEnd'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // console.log('zh: 复活BUT 开始测试发送事件e') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    //下面是上线后的逻辑 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    setTimeout(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (cc.sys.os === cc.sys.OS_ANDROID) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let placementID = AAJS2.getPlacementID(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (ATRewardedVideoSDK.hasAdReady(placementID)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          ATRewardedVideoSDK.showAd(placementID); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          this.clearAdMark(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          console.log('zh:AD 没有准备好') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    }, 300) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    let testMark = true;//是否跳过 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if (testMark) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    console.log('zh: onReviveButton 下面的是原始的逻辑') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    clearInterval(this.reviveTimer) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    this.isRangeAction = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if (this._controller.social.node.active) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this._controller.social.onReviveButton(1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      this.showReviveSuccess() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   showReviveSuccess() { 
														 | 
														
														 | 
														
															   showReviveSuccess() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh:打开复活成功页面') 
														 | 
														
														 | 
														
															     console.log('zh:打开复活成功页面') 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -434,7 +461,7 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this._score.onGameOver(true) 
														 | 
														
														 | 
														
															     this._score.onGameOver(true) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.isRangeAction = false 
														 | 
														
														 | 
														
															     this.isRangeAction = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }, 
														 | 
														
														 | 
														
															   }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  restart() { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  restart() {//再来一局 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     console.log('zh:restart') 
														 | 
														
														 | 
														
															     console.log('zh:restart') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this._controller.pageManager.onOpenPage(1) 
														 | 
														
														 | 
														
															     this._controller.pageManager.onOpenPage(1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     this.recoveryAllBlocks().then(() => { 
														 | 
														
														 | 
														
															     this.recoveryAllBlocks().then(() => { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -544,7 +571,7 @@ cc.Class({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (this.map[i][j] && this.map[i][j].getComponent('element').isSingle && this.map[i][j] && this.map[i][j].getComponent('element')._status != 2) { 
														 | 
														
														 | 
														
															             if (this.map[i][j] && this.map[i][j].getComponent('element').isSingle && this.map[i][j] && this.map[i][j].getComponent('element')._status != 2) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															               let distance = Math.sqrt(Math.pow(pos.x - this.map[i][j].x, 2) + Math.pow(pos.y - this.map[i][j].y, 2)) 
														 | 
														
														 | 
														
															               let distance = Math.sqrt(Math.pow(pos.x - this.map[i][j].x, 2) + Math.pow(pos.y - this.map[i][j].y, 2)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															               this.map[i][j].getComponent('element').onTouched(color, false, true, distance) 
														 | 
														
														 | 
														
															               this.map[i][j].getComponent('element').onTouched(color, false, true, distance) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-              console.log("魔法棒触发的点", i,j,this.map[i][j].getComponent('element').color, this.map[i][j].getComponent('element').isSingle) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+              console.log("魔法棒触发的点", i, j, this.map[i][j].getComponent('element').color, this.map[i][j].getComponent('element').isSingle) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           } 
														 | 
														
														 | 
														
															           } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 |