Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

zouyong 5 лет назад
Родитель
Сommit
f2f835b6dc
57 измененных файлов с 1396 добавлено и 1173 удалено
  1. 0 0
      assets/resources/module/cashNormal.meta
  2. 3 2
      assets/resources/module/cashNormal/cashNormal.prefab
  3. 0 0
      assets/resources/module/cashNormal/cashNormal.prefab.meta
  4. 0 0
      assets/resources/module/cashNormal/prefab.meta
  5. 0 0
      assets/resources/module/cashNormal/prefab/cashNormalItem.prefab
  6. 0 0
      assets/resources/module/cashNormal/prefab/cashNormalItem.prefab.meta
  7. 0 0
      assets/resources/module/cashNormal/texture.meta
  8. 0 0
      assets/resources/module/cashNormal/texture/bg.png
  9. 0 0
      assets/resources/module/cashNormal/texture/bg.png.meta
  10. 0 0
      assets/resources/module/cashNormal/texture/bg1.png
  11. 0 0
      assets/resources/module/cashNormal/texture/bg1.png.meta
  12. 0 0
      assets/resources/module/cashNormal/texture/button.png
  13. 0 0
      assets/resources/module/cashNormal/texture/button.png.meta
  14. 0 0
      assets/resources/module/cashNormal/texture/button1.png
  15. 0 0
      assets/resources/module/cashNormal/texture/button1.png.meta
  16. 0 0
      assets/resources/module/cashNormal/texture/button2.png
  17. 0 0
      assets/resources/module/cashNormal/texture/button2.png.meta
  18. 0 0
      assets/resources/module/cashNormal/texture/close.png
  19. 0 0
      assets/resources/module/cashNormal/texture/close.png.meta
  20. 0 0
      assets/resources/module/cashNormal/texture/icon_hb.png
  21. 0 0
      assets/resources/module/cashNormal/texture/icon_hb.png.meta
  22. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1.png
  23. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1.png.meta
  24. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1_bg.png
  25. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1_bg.png.meta
  26. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1_bg1.png
  27. 0 0
      assets/resources/module/cashNormal/texture/icon_hb1_bg1.png.meta
  28. 0 0
      assets/resources/module/cashNormal/texture/icon_hb_bg.png
  29. 0 0
      assets/resources/module/cashNormal/texture/icon_hb_bg.png.meta
  30. 0 0
      assets/resources/module/cashNormal/texture/title.png
  31. 0 0
      assets/resources/module/cashNormal/texture/title.png.meta
  32. 0 0
      assets/resources/module/cashNormal/texture/title_bg.png
  33. 0 0
      assets/resources/module/cashNormal/texture/title_bg.png.meta
  34. 16 7
      assets/script/game/data/GData.ts
  35. 2 1
      assets/script/game/data/GameData.ts
  36. 1 1
      assets/script/game/data/module/CashNormalData.ts
  37. 0 0
      assets/script/game/data/module/CashNormalData.ts.meta
  38. 0 0
      assets/script/game/module/module/cashNormal.meta
  39. 1 1
      assets/script/game/module/module/cashNormal/CashNormal.ts
  40. 0 0
      assets/script/game/module/module/cashNormal/CashNormal.ts.meta
  41. 0 0
      assets/script/game/module/module/cashNormal/CashNormalItem.ts
  42. 0 0
      assets/script/game/module/module/cashNormal/CashNormalItem.ts.meta
  43. 220 185
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATBannerJSSDK.js
  44. 154 145
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATInterstitialJSSDK.js
  45. 181 124
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATJSSDK.js
  46. 219 196
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATNativeJSSDK.js
  47. 146 137
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATRewardedVideoJSSDK.js
  48. 60 45
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidBannerJS.js
  49. 35 30
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidInterstitialJS.js
  50. 46 42
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidJS.js
  51. 40 30
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidNativeJS.js
  52. 35 30
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidRewardedVideoJS.js
  53. 60 45
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSBannerJS.js
  54. 40 35
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSInterstitialJS.js
  55. 56 51
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSJS.js
  56. 40 30
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSNativeJS.js
  57. 41 36
      assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSRewardedVideoJS.js

+ 0 - 0
assets/resources/module/redBagCash.meta → assets/resources/module/cashNormal.meta


+ 3 - 2
assets/resources/module/redBagCash/redBagCash.prefab → assets/resources/module/cashNormal/cashNormal.prefab

@@ -13,7 +13,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "redBagCash",
+    "_name": "cashNormal",
     "_objFlags": 0,
     "_parent": null,
     "_children": [
@@ -1905,7 +1905,7 @@
       }
     ],
     "scr_item": [
-      "RedBagItem"
+      "CashNormalItem"
     ],
     "itemInterval": 20,
     "_id": ""
@@ -2145,6 +2145,7 @@
     "node_panel": {
       "__id__": 1
     },
+    "transition_type": 0,
     "onComplete": [],
     "_id": ""
   },

+ 0 - 0
assets/resources/module/redBagCash/redBagCash.prefab.meta → assets/resources/module/cashNormal/cashNormal.prefab.meta


+ 0 - 0
assets/resources/module/redBagCash/prefab.meta → assets/resources/module/cashNormal/prefab.meta


+ 0 - 0
assets/resources/module/redBagCash/prefab/redBagItem.prefab → assets/resources/module/cashNormal/prefab/cashNormalItem.prefab


+ 0 - 0
assets/resources/module/redBagCash/prefab/redBagItem.prefab.meta → assets/resources/module/cashNormal/prefab/cashNormalItem.prefab.meta


+ 0 - 0
assets/resources/module/redBagCash/texture.meta → assets/resources/module/cashNormal/texture.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/bg.png → assets/resources/module/cashNormal/texture/bg.png


+ 0 - 0
assets/resources/module/redBagCash/texture/bg.png.meta → assets/resources/module/cashNormal/texture/bg.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/bg1.png → assets/resources/module/cashNormal/texture/bg1.png


+ 0 - 0
assets/resources/module/redBagCash/texture/bg1.png.meta → assets/resources/module/cashNormal/texture/bg1.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/button.png → assets/resources/module/cashNormal/texture/button.png


+ 0 - 0
assets/resources/module/redBagCash/texture/button.png.meta → assets/resources/module/cashNormal/texture/button.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/button1.png → assets/resources/module/cashNormal/texture/button1.png


+ 0 - 0
assets/resources/module/redBagCash/texture/button1.png.meta → assets/resources/module/cashNormal/texture/button1.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/button2.png → assets/resources/module/cashNormal/texture/button2.png


+ 0 - 0
assets/resources/module/redBagCash/texture/button2.png.meta → assets/resources/module/cashNormal/texture/button2.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/close.png → assets/resources/module/cashNormal/texture/close.png


+ 0 - 0
assets/resources/module/redBagCash/texture/close.png.meta → assets/resources/module/cashNormal/texture/close.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb.png → assets/resources/module/cashNormal/texture/icon_hb.png


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb.png.meta → assets/resources/module/cashNormal/texture/icon_hb.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1.png → assets/resources/module/cashNormal/texture/icon_hb1.png


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1.png.meta → assets/resources/module/cashNormal/texture/icon_hb1.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1_bg.png → assets/resources/module/cashNormal/texture/icon_hb1_bg.png


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1_bg.png.meta → assets/resources/module/cashNormal/texture/icon_hb1_bg.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1_bg1.png → assets/resources/module/cashNormal/texture/icon_hb1_bg1.png


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb1_bg1.png.meta → assets/resources/module/cashNormal/texture/icon_hb1_bg1.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb_bg.png → assets/resources/module/cashNormal/texture/icon_hb_bg.png


+ 0 - 0
assets/resources/module/redBagCash/texture/icon_hb_bg.png.meta → assets/resources/module/cashNormal/texture/icon_hb_bg.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/title.png → assets/resources/module/cashNormal/texture/title.png


+ 0 - 0
assets/resources/module/redBagCash/texture/title.png.meta → assets/resources/module/cashNormal/texture/title.png.meta


+ 0 - 0
assets/resources/module/redBagCash/texture/title_bg.png → assets/resources/module/cashNormal/texture/title_bg.png


+ 0 - 0
assets/resources/module/redBagCash/texture/title_bg.png.meta → assets/resources/module/cashNormal/texture/title_bg.png.meta


+ 16 - 7
assets/script/game/data/GData.ts

@@ -16,7 +16,7 @@ import { AdData } from "./AdData";
 import { RewardData } from "./module/RewardData";
 import MoreGameData from "./MoreGameData";
 import { Data } from "../../mk/data/Data";
-import { RedBagCashData } from "./module/RedBagCashData";
+import { CashNormalData } from "./module/CashNormalData";
 import { ReceiptNoticeData } from "./module/ReceiptNoticeData";
 
 /**
@@ -38,18 +38,27 @@ class GData {
     public storageData: StorageData;
 
     //module
+    /** 领取红包奖励 */
     public reward: RewardData;
+    /** 帮助 */
     public help: HelpData;
+    /** 转盘 */
     public turnable: TurnableData;
+    /** 裂变数据 */
     public fission: FissionData;
+    /** 存钱罐 */
     public pigbank: PigBankData;
+    /** 福袋数据 */
     public luckybag: LuckyBagData;
+    /** 签到 */
     public sign: SignData;
+    /** 到账通知 */
     public receiptNotice: ReceiptNoticeData;
-    public redBagCash: RedBagCashData;
-
+    /** 红包提现(常规提现) */
+    public cashNormal: CashNormalData;
+    /** 更多游戏 */
     public moreGame: MoreGameData;
-
+    /** 模块数据 */
     public moduleData: Map<number, Data>;
 
     init() {
@@ -69,7 +78,7 @@ class GData {
         this.luckybag = new LuckyBagData();
         this.sign = new SignData();
         this.receiptNotice = new ReceiptNoticeData();
-        this.redBagCash = new RedBagCashData();
+        this.cashNormal = new CashNormalData();
         this.moreGame = new MoreGameData();
 
         this.moduleData = new Map<number, Data>();
@@ -79,7 +88,7 @@ class GData {
         this.moduleData.set(Fun.pigbank, this.pigbank);
         this.moduleData.set(Fun.luckybag, this.luckybag);
         this.moduleData.set(Fun.sign, this.sign);
-        this.moduleData.set(Fun.redBagCash, this.redBagCash);
+        this.moduleData.set(Fun.cashNormal, this.cashNormal);
     }
 }
 
@@ -93,7 +102,7 @@ export enum Fun {
     pigbank = 4,    //存钱罐
     luckybag = 5,   //福袋
     sign = 6,       //签到
-    redBagCash = 7, //常规提现
+    cashNormal = 7, //常规提现
 }
 
 declare global {

+ 2 - 1
assets/script/game/data/GameData.ts

@@ -52,7 +52,8 @@ export class GameData {
         gData.moduleData.forEach(element => {
             element.init();
         });
-
+        // 提现记录数据
+        gData.cashNormal.getRecord()
         this.dataFinish = true;
     }
 

+ 1 - 1
assets/script/game/data/module/RedBagCashData.ts → assets/script/game/data/module/CashNormalData.ts

@@ -3,7 +3,7 @@ import { Data } from "../../../mk/data/Data";
  * 红包提现数据
  * @author 薛鸿潇
  */
-export class RedBagCashData extends Data {
+export class CashNormalData extends Data {
     
 
     public async getRecord(){

+ 0 - 0
assets/script/game/data/module/RedBagCashData.ts.meta → assets/script/game/data/module/CashNormalData.ts.meta


+ 0 - 0
assets/script/game/module/module/redBagCash.meta → assets/script/game/module/module/cashNormal.meta


+ 1 - 1
assets/script/game/module/module/redBagCash/RedBagCash.ts → assets/script/game/module/module/cashNormal/CashNormal.ts

@@ -17,7 +17,7 @@ export default class RedBagCash extends cc.Component {
     start() {
         this.initScrollView();
         // 请求记录
-        // gData.redBagCash.getRecord()
+        // gData.cashNormal.getRecord()
     }
 
     // update (dt) {}

+ 0 - 0
assets/script/game/module/module/redBagCash/RedBagCash.ts.meta → assets/script/game/module/module/cashNormal/CashNormal.ts.meta


+ 0 - 0
assets/script/game/module/module/redBagCash/RedBagItem.ts → assets/script/game/module/module/cashNormal/CashNormalItem.ts


+ 0 - 0
assets/script/game/module/module/redBagCash/RedBagItem.ts.meta → assets/script/game/module/module/cashNormal/CashNormalItem.ts.meta


+ 220 - 185
assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATBannerJSSDK.js

@@ -1,186 +1,221 @@
-
-var ATAndroidBannerJS = require("./Android/ATAndroidBannerJS");
-var ATiOSBannerJS = require("./iOS/ATiOSBannerJS");
-
-var initPlatformBridge = function() {  
-    if (cc.sys.os === cc.sys.OS_IOS) {           
-        return ATiOSBannerJS;
-    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
-        return ATAndroidBannerJS;
-    }
-};
-
-var platformBridge = initPlatformBridge();
-
-
-var ATBannerSDK = ATBannerSDK || {
-    kATBannerAdLoadingExtraBannerAdSizeStruct: "banner_ad_size_struct",
-	kATBannerAdShowingPositionTop : "top",
-    kATBannerAdShowingPositionBottom : "bottom",
-	
-	kATBannerAdInlineAdaptiveWidth : "inline_adaptive_width",
-	kATBannerAdInlineAdaptiveOrientation : "inline_adaptive_orientation",
-	kATBannerAdInlineAdaptiveOrientationCurrent : 0,
-	kATBannerAdInlineAdaptiveOrientationPortrait : 1,
-	kATBannerAdInlineAdaptiveOrientationLandscape : 2,
-	
-
-    ATBannerListener : {
-        developerCallback : null,
-
-        onBannerAdLoaded : function (placementId) {
-            if(this.developerCallback != null && this.developerCallback.onBannerAdLoaded != null && undefined != this.developerCallback.onBannerAdLoaded) {
-                this.developerCallback.onBannerAdLoaded(placementId);
-            }
-        },
-
-        onBannerAdLoadFail : function(placementId, errorInfo) {
-          if(this.developerCallback != null && this.developerCallback.onBannerAdLoadFail != null && undefined != this.developerCallback.onBannerAdLoadFail) {
-                this.developerCallback.onBannerAdLoadFail(placementId, errorInfo);
-            }
-        },
-
-        onBannerAdShow : function(placementId, callbackInfo) {
-           if(this.developerCallback != null && this.developerCallback.onBannerAdShow != null && undefined != this.developerCallback.onBannerAdShow) {
-                this.developerCallback.onBannerAdShow(placementId, callbackInfo);
-            }
-        },
-
-        onBannerAdClick : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onBannerAdClick != null && undefined != this.developerCallback.onBannerAdClick) {
-                this.developerCallback.onBannerAdClick(placementId, callbackInfo);
-            }
-        },
-
-        onBannerAdAutoRefresh : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onBannerAdAutoRefresh != null && undefined != this.developerCallback.onBannerAdAutoRefresh) {
-                this.developerCallback.onBannerAdAutoRefresh(placementId, callbackInfo);
-            }
-        },
-
-        onBannerAdAutoRefreshFail : function(placementId, errorInfo) {
-            if(this.developerCallback != null && this.developerCallback.onBannerAdAutoRefreshFail != null && undefined != this.developerCallback.onBannerAdAutoRefreshFail) {
-                this.developerCallback.onBannerAdAutoRefreshFail(placementId, errorInfo);
-            }
-        },
-
-        onBannerAdCloseButtonTapped : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onBannerAdCloseButtonTapped != null && undefined != this.developerCallback.onBannerAdCloseButtonTapped) {
-                this.developerCallback.onBannerAdCloseButtonTapped(placementId, callbackInfo);
-            }
-        }
-        
-    },
-    
-    loadBanner : function(placementId, settings={}) {
-
-        if (undefined != platformBridge && platformBridge != null) {
-			
-			if (settings.hasOwnProperty(ATBannerSDK.kATBannerAdLoadingExtraBannerAdSizeStruct)) {
-				var loadAdSize = settings[ATBannerSDK.kATBannerAdLoadingExtraBannerAdSizeStruct];
-				settings["width"] = loadAdSize["width"];
-				settings["height"] = loadAdSize["height"];
-			}
-			
-            platformBridge.loadBanner(placementId, JSON.stringify(settings));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setAdListener : function(listener) {
-        var eventJSON = {};
-        eventJSON[LoadedCallbackKey]= "ATBannerJSSDK.ATBannerListener.onBannerAdLoaded",
-        eventJSON[LoadFailCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdLoadFail",
-        eventJSON[CloseCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdCloseButtonTapped",
-        eventJSON[ClickCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdClick",
-        eventJSON[ShowCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdShow",
-        eventJSON[RefreshCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdAutoRefresh",
-        eventJSON[RefreshFailCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdAutoRefreshFail"
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.setAdListener(JSON.stringify(eventJSON));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-
-        this.ATBannerListener.developerCallback = listener;
-    },
-
-    hasAdReady : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-            return platformBridge.hasAdReady(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-        return false;
-    },
-
-    showAdInPosition : function(placementId, position) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAdInPosition(placementId, position);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    showAdInRectangle : function(placementId, showAdRect) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAdInRectangle(placementId, JSON.stringify(showAdRect));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-
-    removeAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.removeAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    reShowAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.reShowAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    hideAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.hideAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    createLoadAdSize : function(width, height) {
-    	var loadAdSize = {};
-    	loadAdSize["width"] = width;
-    	loadAdSize["height"] = height;
-    	return loadAdSize;
-    },
-
-    createShowAdRect : function(x, y, width, height) {
-    	var adRect = {};
-    	adRect["x"] = x;
-    	adRect["y"] = y;
-    	adRect["width"] = width;
-    	adRect["height"] = height;
-    	return adRect;
-    }
-
-  
-};
-
-const LoadedCallbackKey = "BannerLoaded";
-const LoadFailCallbackKey = "BannerLoadFail";
-const CloseCallbackKey = "BannerCloseButtonTapped";
-const ClickCallbackKey = "BannerClick";
-const ShowCallbackKey = "BannerShow";
-const RefreshCallbackKey = "BannerRefresh";
-const RefreshFailCallbackKey = "BannerRefreshFail";
-
+
+var ATAndroidBannerJS = require("./Android/ATAndroidBannerJS");
+var ATiOSBannerJS = require("./iOS/ATiOSBannerJS");
+
+var initPlatformBridge = function() {  
+    if (cc.sys.os === cc.sys.OS_IOS) {           
+        return ATiOSBannerJS;
+    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
+        return ATAndroidBannerJS;
+    }
+};
+
+var platformBridge = initPlatformBridge();
+
+
+var ATBannerSDK = ATBannerSDK || {
+    kATBannerAdLoadingExtraBannerAdSizeStruct: "banner_ad_size_struct",
+	kATBannerAdShowingPositionTop : "top",
+    kATBannerAdShowingPositionBottom : "bottom",
+	
+	kATBannerAdInlineAdaptiveWidth : "inline_adaptive_width",
+	kATBannerAdInlineAdaptiveOrientation : "inline_adaptive_orientation",
+	kATBannerAdInlineAdaptiveOrientationCurrent : 0,
+	kATBannerAdInlineAdaptiveOrientationPortrait : 1,
+	kATBannerAdInlineAdaptiveOrientationLandscape : 2,
+
+	kATBannerAdAdaptiveWidth : "adaptive_width",
+	kATBannerAdAdaptiveOrientation : "adaptive_orientation",
+	kATBannerAdAdaptiveOrientationCurrent : 0,
+	kATBannerAdAdaptiveOrientationPortrait : 1,
+	kATBannerAdAdaptiveOrientationLandscape : 2,
+
+
+    ATBannerListener : {
+        developerCallback : null,
+
+        onBannerAdLoaded : function (placementId) {
+            if(this.developerCallback != null && this.developerCallback.onBannerAdLoaded != null && undefined != this.developerCallback.onBannerAdLoaded) {
+                this.developerCallback.onBannerAdLoaded(placementId);
+            }
+        },
+
+        onBannerAdLoadFail : function(placementId, errorInfo) {
+          if(this.developerCallback != null && this.developerCallback.onBannerAdLoadFail != null && undefined != this.developerCallback.onBannerAdLoadFail) {
+                this.developerCallback.onBannerAdLoadFail(placementId, errorInfo);
+            }
+        },
+
+        onBannerAdShow : function(placementId, callbackInfo) {
+           if(this.developerCallback != null && this.developerCallback.onBannerAdShow != null && undefined != this.developerCallback.onBannerAdShow) {
+                this.developerCallback.onBannerAdShow(placementId, callbackInfo);
+            }
+        },
+
+        onBannerAdClick : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onBannerAdClick != null && undefined != this.developerCallback.onBannerAdClick) {
+                this.developerCallback.onBannerAdClick(placementId, callbackInfo);
+            }
+        },
+
+        onBannerAdAutoRefresh : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onBannerAdAutoRefresh != null && undefined != this.developerCallback.onBannerAdAutoRefresh) {
+                this.developerCallback.onBannerAdAutoRefresh(placementId, callbackInfo);
+            }
+        },
+
+        onBannerAdAutoRefreshFail : function(placementId, errorInfo) {
+            if(this.developerCallback != null && this.developerCallback.onBannerAdAutoRefreshFail != null && undefined != this.developerCallback.onBannerAdAutoRefreshFail) {
+                this.developerCallback.onBannerAdAutoRefreshFail(placementId, errorInfo);
+            }
+        },
+
+        onBannerAdCloseButtonTapped : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onBannerAdCloseButtonTapped != null && undefined != this.developerCallback.onBannerAdCloseButtonTapped) {
+                this.developerCallback.onBannerAdCloseButtonTapped(placementId, callbackInfo);
+            }
+        }
+        
+    },
+    
+    loadBanner : function(placementId, settings={}) {
+
+        if (undefined != platformBridge && platformBridge != null) {
+			
+			if (settings.hasOwnProperty(ATBannerSDK.kATBannerAdLoadingExtraBannerAdSizeStruct)) {
+				var loadAdSize = settings[ATBannerSDK.kATBannerAdLoadingExtraBannerAdSizeStruct];
+				settings["width"] = loadAdSize["width"];
+				settings["height"] = loadAdSize["height"];
+			}
+			
+            platformBridge.loadBanner(placementId, JSON.stringify(settings));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setAdListener : function(listener) {
+        var eventJSON = {};
+        eventJSON[LoadedCallbackKey]= "ATBannerJSSDK.ATBannerListener.onBannerAdLoaded",
+        eventJSON[LoadFailCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdLoadFail",
+        eventJSON[CloseCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdCloseButtonTapped",
+        eventJSON[ClickCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdClick",
+        eventJSON[ShowCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdShow",
+        eventJSON[RefreshCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdAutoRefresh",
+        eventJSON[RefreshFailCallbackKey]=  "ATBannerJSSDK.ATBannerListener.onBannerAdAutoRefreshFail"
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.setAdListener(JSON.stringify(eventJSON));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+
+        this.ATBannerListener.developerCallback = listener;
+    },
+
+    hasAdReady : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.hasAdReady(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return false;
+    },
+
+    checkAdStatus : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.checkAdStatus(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return "";
+    },
+
+    showAdInPosition : function(placementId, position) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInPosition(placementId, position);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInPositionAndScenario : function(placementId, position, scenario) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInPosition(placementId, position, scenario);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInRectangle : function(placementId, showAdRect) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInRectangle(placementId, JSON.stringify(showAdRect));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInRectangleAndScenario : function(placementId, showAdRect, scenario) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInRectangle(placementId, JSON.stringify(showAdRect), scenario);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    removeAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.removeAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    reShowAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.reShowAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    hideAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.hideAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    createLoadAdSize : function(width, height) {
+    	var loadAdSize = {};
+    	loadAdSize["width"] = width;
+    	loadAdSize["height"] = height;
+    	return loadAdSize;
+    },
+
+    createShowAdRect : function(x, y, width, height) {
+    	var adRect = {};
+    	adRect["x"] = x;
+    	adRect["y"] = y;
+    	adRect["width"] = width;
+    	adRect["height"] = height;
+    	return adRect;
+    }
+
+  
+};
+
+
+
+
+
+
+const LoadedCallbackKey = "BannerLoaded";
+const LoadFailCallbackKey = "BannerLoadFail";
+const CloseCallbackKey = "BannerCloseButtonTapped";
+const ClickCallbackKey = "BannerClick";
+const ShowCallbackKey = "BannerShow";
+const RefreshCallbackKey = "BannerRefresh";
+const RefreshFailCallbackKey = "BannerRefreshFail";
+
 window.ATBannerJSSDK = ATBannerSDK;

+ 154 - 145
assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATInterstitialJSSDK.js

@@ -1,146 +1,155 @@
-var ATiOSInterstitialJS = require("./iOS/ATiOSInterstitialJS");
-var ATAndroidInterstitialJS = require("./Android/ATAndroidInterstitialJS");
-
-var initPlatformBridge = function() {  
-    if (cc.sys.os === cc.sys.OS_IOS) {           
-        return ATiOSInterstitialJS;
-    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
-        return ATAndroidInterstitialJS;
-    }
-};
-
-var platformBridge = initPlatformBridge();
-
-
-var ATInterstitialSDK = ATInterstitialSDK || {
-
-	UseRewardedVideoAsInterstitial: "UseRewardedVideoAsInterstitial",
-
-    ATInterstitialListener : {
-        developerCallback : null,
-
-        onInterstitialAdLoaded : function (placementId) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdLoaded != null && undefined != this.developerCallback.onInterstitialAdLoaded) {
-                this.developerCallback.onInterstitialAdLoaded(placementId);
-            }
-        },
-
-        onInterstitialAdLoadFail : function(placementId, errorInfo) {
-          if(this.developerCallback != null && this.developerCallback.onInterstitialAdLoadFail != null && undefined != this.developerCallback.onInterstitialAdLoadFail) {
-                this.developerCallback.onInterstitialAdLoadFail(placementId, errorInfo);
-            }
-        },
-
-        onInterstitialAdShow : function(placementId, callbackInfo) {
-           if(this.developerCallback != null && this.developerCallback.onInterstitialAdShow != null && undefined != this.developerCallback.onInterstitialAdShow) {
-                this.developerCallback.onInterstitialAdShow(placementId, callbackInfo);
-            }
-        },
-
-        onInterstitialAdStartPlayingVideo : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdStartPlayingVideo != null && undefined != this.developerCallback.onInterstitialAdStartPlayingVideo) {
-                this.developerCallback.onInterstitialAdStartPlayingVideo(placementId, callbackInfo);
-            }
-        },
-
-        onInterstitialAdEndPlayingVideo : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdEndPlayingVideo != null && undefined != this.developerCallback.onInterstitialAdEndPlayingVideo) {
-                this.developerCallback.onInterstitialAdEndPlayingVideo(placementId, callbackInfo);
-            }
-        },
-
-        onInterstitialAdFailedToPlayVideo : function(placementId, errorInfo) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdFailedToPlayVideo != null && undefined != this.developerCallback.onInterstitialAdFailedToPlayVideo) {
-                this.developerCallback.onInterstitialAdFailedToPlayVideo(placementId, errorInfo);
-            }
-        },
-
-        onInterstitialAdFailedToShow : function(placementId) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdFailedToShow != null && undefined != this.developerCallback.onInterstitialAdFailedToShow) {
-                this.developerCallback.onInterstitialAdFailedToShow(placementId);
-            }
-        },
-
-        onInterstitialAdClose : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdClose != null && undefined != this.developerCallback.onInterstitialAdClose) {
-                this.developerCallback.onInterstitialAdClose(placementId, callbackInfo);
-            }
-        },
-
-        onInterstitialAdClick : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onInterstitialAdClick != null && undefined != this.developerCallback.onInterstitialAdClick) {
-                this.developerCallback.onInterstitialAdClick(placementId, callbackInfo);
-            }
-        }
-        
-    },
-    
-	loadInterstitial : function(placementId, settings={}) {
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.loadInterstitial(placementId, JSON.stringify(settings));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setAdListener : function(listener) {
-        var eventJSON = {};
-        eventJSON[LoadedCallbackKey]="ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdLoaded",
-        eventJSON[LoadFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdLoadFail",
-        eventJSON[PlayStartCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdStartPlayingVideo",
-        eventJSON[PlayEndCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdEndPlayingVideo",
-        eventJSON[PlayFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdFailedToPlayVideo",
-        eventJSON[CloseCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdClose",
-        eventJSON[ClickCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdClick",
-        eventJSON[ShowCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdShow",
-        eventJSON[ShowFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdFailedToShow"
-
-        if (undefined != platformBridge && platformBridge != null) {
-             platformBridge.setAdListener(JSON.stringify(eventJSON));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-
-        this.ATInterstitialListener.developerCallback = listener;
-    },
-
-    hasAdReady : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-            return platformBridge.hasAdReady(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-        return false;
-    },
-
-    showAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    showAdInScenario : function(placementId, scenario="") {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAdInScenario(placementId, scenario);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    } 
-  
-  
-};
-
-const LoadedCallbackKey = "InterstitialLoaded";
-const LoadFailCallbackKey = "InterstitialLoadFail";
-const PlayStartCallbackKey = "InterstitialPlayStart";
-const PlayEndCallbackKey = "InterstitialPlayEnd";
-const PlayFailCallbackKey = "InterstitialPlayFail";
-const CloseCallbackKey = "InterstitialClose";
-const ClickCallbackKey = "InterstitialClick";
-const ShowCallbackKey = "InterstitialAdShow";
-const ShowFailCallbackKey = "InterstitialAdShowFail";
-
+var ATiOSInterstitialJS = require("./iOS/ATiOSInterstitialJS");
+var ATAndroidInterstitialJS = require("./Android/ATAndroidInterstitialJS");
+
+var initPlatformBridge = function() {  
+    if (cc.sys.os === cc.sys.OS_IOS) {           
+        return ATiOSInterstitialJS;
+    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
+        return ATAndroidInterstitialJS;
+    }
+};
+
+var platformBridge = initPlatformBridge();
+
+
+var ATInterstitialSDK = ATInterstitialSDK || {
+
+	UseRewardedVideoAsInterstitial: "UseRewardedVideoAsInterstitial",
+
+    ATInterstitialListener : {
+        developerCallback : null,
+
+        onInterstitialAdLoaded : function (placementId) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdLoaded != null && undefined != this.developerCallback.onInterstitialAdLoaded) {
+                this.developerCallback.onInterstitialAdLoaded(placementId);
+            }
+        },
+
+        onInterstitialAdLoadFail : function(placementId, errorInfo) {
+          if(this.developerCallback != null && this.developerCallback.onInterstitialAdLoadFail != null && undefined != this.developerCallback.onInterstitialAdLoadFail) {
+                this.developerCallback.onInterstitialAdLoadFail(placementId, errorInfo);
+            }
+        },
+
+        onInterstitialAdShow : function(placementId, callbackInfo) {
+           if(this.developerCallback != null && this.developerCallback.onInterstitialAdShow != null && undefined != this.developerCallback.onInterstitialAdShow) {
+                this.developerCallback.onInterstitialAdShow(placementId, callbackInfo);
+            }
+        },
+
+        onInterstitialAdStartPlayingVideo : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdStartPlayingVideo != null && undefined != this.developerCallback.onInterstitialAdStartPlayingVideo) {
+                this.developerCallback.onInterstitialAdStartPlayingVideo(placementId, callbackInfo);
+            }
+        },
+
+        onInterstitialAdEndPlayingVideo : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdEndPlayingVideo != null && undefined != this.developerCallback.onInterstitialAdEndPlayingVideo) {
+                this.developerCallback.onInterstitialAdEndPlayingVideo(placementId, callbackInfo);
+            }
+        },
+
+        onInterstitialAdFailedToPlayVideo : function(placementId, errorInfo) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdFailedToPlayVideo != null && undefined != this.developerCallback.onInterstitialAdFailedToPlayVideo) {
+                this.developerCallback.onInterstitialAdFailedToPlayVideo(placementId, errorInfo);
+            }
+        },
+
+        onInterstitialAdFailedToShow : function(placementId) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdFailedToShow != null && undefined != this.developerCallback.onInterstitialAdFailedToShow) {
+                this.developerCallback.onInterstitialAdFailedToShow(placementId);
+            }
+        },
+
+        onInterstitialAdClose : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdClose != null && undefined != this.developerCallback.onInterstitialAdClose) {
+                this.developerCallback.onInterstitialAdClose(placementId, callbackInfo);
+            }
+        },
+
+        onInterstitialAdClick : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onInterstitialAdClick != null && undefined != this.developerCallback.onInterstitialAdClick) {
+                this.developerCallback.onInterstitialAdClick(placementId, callbackInfo);
+            }
+        }
+        
+    },
+    
+	loadInterstitial : function(placementId, settings={}) {
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.loadInterstitial(placementId, JSON.stringify(settings));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setAdListener : function(listener) {
+        var eventJSON = {};
+        eventJSON[LoadedCallbackKey]="ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdLoaded",
+        eventJSON[LoadFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdLoadFail",
+        eventJSON[PlayStartCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdStartPlayingVideo",
+        eventJSON[PlayEndCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdEndPlayingVideo",
+        eventJSON[PlayFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdFailedToPlayVideo",
+        eventJSON[CloseCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdClose",
+        eventJSON[ClickCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdClick",
+        eventJSON[ShowCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdShow",
+        eventJSON[ShowFailCallbackKey]= "ATInterstitialJSSDK.ATInterstitialListener.onInterstitialAdFailedToShow"
+
+        if (undefined != platformBridge && platformBridge != null) {
+             platformBridge.setAdListener(JSON.stringify(eventJSON));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+
+        this.ATInterstitialListener.developerCallback = listener;
+    },
+
+    hasAdReady : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.hasAdReady(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return false;
+    },
+
+    checkAdStatus : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.checkAdStatus(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return "";
+    },
+
+    showAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInScenario : function(placementId, scenario="") {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInScenario(placementId, scenario);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    } 
+  
+  
+};
+
+const LoadedCallbackKey = "InterstitialLoaded";
+const LoadFailCallbackKey = "InterstitialLoadFail";
+const PlayStartCallbackKey = "InterstitialPlayStart";
+const PlayEndCallbackKey = "InterstitialPlayEnd";
+const PlayFailCallbackKey = "InterstitialPlayFail";
+const CloseCallbackKey = "InterstitialClose";
+const ClickCallbackKey = "InterstitialClick";
+const ShowCallbackKey = "InterstitialAdShow";
+const ShowFailCallbackKey = "InterstitialAdShowFail";
+
 window.ATInterstitialJSSDK = ATInterstitialSDK;

+ 181 - 124
assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATJSSDK.js

@@ -1,125 +1,182 @@
-
-var ATAndroidJS = require("./Android/ATAndroidJS");
-var ATiOSJS = require("./iOS/ATiOSJS");
-var isDebugLog = false;
-
-var initPlatformBridge = function() {  
-    if (cc.sys.os === cc.sys.OS_IOS) {           
-        return ATiOSJS;
-    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
-        return ATAndroidJS;
-    }
-};
-
-var platformBridge = initPlatformBridge();
-
-
-var ATSDK = ATSDK || {
-
-    kATUserLocationUnknown : 0,
-    kATUserLocationInEU : 1,
-    kATUserLocationOutOfEU : 2,
-
-
-    PERSONALIZED : 0,
-    NONPERSONALIZED :1,
-    UNKNOWN : 2,
-
-    ATSDKListener : {
-        userLocationCallback : null,
-
-        getUserLocationCallback : function(userLocation) {
-            if(undefined != this.userLocationCallback && this.userLocationCallback != null ){
-                this.userLocationCallback(userLocation);
-            }
-        }
-    },
-    
-    initSDK : function(appId, appKey) {
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.initSDK(appId, appKey);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    initCustomMap : function(customMap) {
-        if (undefined != platformBridge && platformBridge != null) {
-            if(undefined != customMap && customMap != null) {
-                platformBridge.initCustomMap(JSON.stringify(customMap));
-            }
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setPlacementCustomMap : function(placmentId, customMap) {
-        if (undefined != platformBridge && platformBridge != null) {
-            if(undefined != customMap && customMap != null) {
-                 platformBridge.setPlacementCustomMap(placmentId, JSON.stringify(customMap));
-            }
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setGDPRLevel : function(level) {
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.setGDPRLevel(level);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    getGDPRLevel : function() {
-        if (undefined != platformBridge && platformBridge != null) {
-            return platformBridge.getGDPRLevel();
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-        return this.UNKNOWN;
-    },
-
-    getUserLocation : function(userLocationCallback) {
-        this.ATSDKListener.userLocationCallback = userLocationCallback;
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.getUserLocation(GetUserLocationJsCallback);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    showGDPRAuth : function () {
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.showGDPRAuth();
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setLogDebug : function (debug) {
-        isDebugLog = debug;
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.setLogDebug(debug);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    printLog : function(msg) {
-        if (undefined != msg && null != msg && isDebugLog && platformBridge != null ) {
-            if (undefined != platformBridge && platformBridge != null) {
-                platformBridge.printJsLog(msg); 
-            } else {
-                cc.log("You must run on Android or iOS.");
-            }
-                
-        }
-    }
-  
-};
-
-const GetUserLocationJsCallback = "ATJSSDK.ATSDKListener.getUserLocationCallback";
-
+
+var ATAndroidJS = require("./Android/ATAndroidJS");
+var ATiOSJS = require("./iOS/ATiOSJS");
+var isDebugLog = false;
+
+var initPlatformBridge = function() {  
+    if (cc.sys.os === cc.sys.OS_IOS) {           
+        return ATiOSJS;
+    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
+        return ATAndroidJS;
+    }
+};
+
+var platformBridge = initPlatformBridge();
+
+
+var ATSDK = ATSDK || {
+
+    kATUserLocationUnknown : 0,
+    kATUserLocationInEU : 1,
+    kATUserLocationOutOfEU : 2,
+
+
+    PERSONALIZED : 0,
+    NONPERSONALIZED :1,
+    UNKNOWN : 2,
+    
+    
+    //for android and ios
+    OS_VERSION_NAME : "os_vn",
+    OS_VERSION_CODE : "os_vc",
+    APP_PACKAGE_NAME : "package_name",
+    APP_VERSION_NAME : "app_vn",
+    APP_VERSION_CODE : "app_vc",
+
+    BRAND : "brand",
+    MODEL : "model",
+    DEVICE_SCREEN_SIZE : "screen",
+    MNC : "mnc",
+    MCC : "mcc",
+
+    LANGUAGE : "language",
+    TIMEZONE : "timezone",
+    USER_AGENT : "ua",
+    ORIENTATION : "orient",
+    NETWORK_TYPE : "network_type",
+
+    //for android
+    INSTALLER : "it_src",
+    ANDROID_ID : "android_id",
+    GAID : "gaid",
+    MAC : "mac",
+    IMEI : "imei",
+    OAID : "oaid",
+    
+    //for ios
+    IDFA : "idfa",
+    IDFV : "idfv",
+
+    ATSDKListener : {
+        userLocationCallback : null,
+
+        getUserLocationCallback : function(userLocation) {
+            if(undefined != this.userLocationCallback && this.userLocationCallback != null ){
+                this.userLocationCallback(userLocation);
+            }
+        }
+    },
+    
+    initSDK : function(appId, appKey) {
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.initSDK(appId, appKey);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    initCustomMap : function(customMap) {
+        if (undefined != platformBridge && platformBridge != null) {
+            if(undefined != customMap && customMap != null) {
+                platformBridge.initCustomMap(JSON.stringify(customMap));
+            }
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setPlacementCustomMap : function(placmentId, customMap) {
+        if (undefined != platformBridge && platformBridge != null) {
+            if(undefined != customMap && customMap != null) {
+                 platformBridge.setPlacementCustomMap(placmentId, JSON.stringify(customMap));
+            }
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setGDPRLevel : function(level) {
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.setGDPRLevel(level);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    getGDPRLevel : function() {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.getGDPRLevel();
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return this.UNKNOWN;
+    },
+
+    getUserLocation : function(userLocationCallback) {
+        this.ATSDKListener.userLocationCallback = userLocationCallback;
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.getUserLocation(GetUserLocationJsCallback);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showGDPRAuth : function () {
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.showGDPRAuth();
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setLogDebug : function (debug) {
+        isDebugLog = debug;
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.setLogDebug(debug);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    printLog : function(msg) {
+        if (undefined != msg && null != msg && isDebugLog && platformBridge != null ) {
+            if (undefined != platformBridge && platformBridge != null) {
+                platformBridge.printJsLog(msg); 
+            } else {
+                cc.log("You must run on Android or iOS.");
+            }
+                
+        }
+    },
+
+    deniedUploadDeviceInfo : function (deniedInfo) {
+        if (undefined != platformBridge && platformBridge != null) {
+			
+			if (deniedInfo != null) {
+				var length = deniedInfo.length;
+				var deniedInfoString = "";
+				for (var i = 0; i < length; i++) {
+					var info = deniedInfo[i];
+					if (i == 0) {
+						deniedInfoString = info;
+					} else {
+						deniedInfoString = deniedInfoString + "," + info;
+					}
+				}
+				
+				cc.log("test__" + deniedInfoString)
+				
+				platformBridge.deniedUploadDeviceInfo(deniedInfoString);
+			}
+			
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+  
+};
+
+const GetUserLocationJsCallback = "ATJSSDK.ATSDKListener.getUserLocationCallback";
+
 window.ATJSSDK = ATSDK;

+ 219 - 196
assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATNativeJSSDK.js

@@ -1,197 +1,220 @@
-
-var ATAndroidNativeJS = require("./Android/ATAndroidNativeJS");
-var ATiOSNativeJS = require("./iOS/ATiOSNativeJS");
-var initPlatformBridge = function() {  
-    if (cc.sys.os === cc.sys.OS_IOS) {           
-        return ATiOSNativeJS;
-    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
-        return ATAndroidNativeJS;
-    }
-};
-
-var platformBridge = initPlatformBridge();
-
-
-var ATNativeSDK = ATNativeSDK || {   
-
-    ATNativeListener : {
-        developerCallback : null,
-
-        onNativeAdLoaded : function (placementId) {
-            if(this.developerCallback != null && this.developerCallback.onNativeAdLoaded != null && undefined != this.developerCallback.onNativeAdLoaded) {
-                this.developerCallback.onNativeAdLoaded(placementId);
-            }
-        },
-
-        onNativeAdLoadFail : function(placementId, errorInfo) {
-          if(this.developerCallback != null && this.developerCallback.onNativeAdLoadFail != null && undefined != this.developerCallback.onNativeAdLoadFail) {
-                this.developerCallback.onNativeAdLoadFail(placementId, errorInfo);
-            }
-        },
-
-        onNativeAdShow : function(placementId, callbackInfo) {
-           if(this.developerCallback != null && this.developerCallback.onNativeAdShow != null && undefined != this.developerCallback.onNativeAdShow) {
-                this.developerCallback.onNativeAdShow(placementId, callbackInfo);
-            }
-        },
-
-        onNativeAdClick : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onNativeAdClick != null && undefined != this.developerCallback.onNativeAdClick) {
-                this.developerCallback.onNativeAdClick(placementId, callbackInfo);
-            }
-        },
-
-        onNativeAdVideoStart : function(placementId) {
-            if(this.developerCallback != null && this.developerCallback.onNativeAdVideoStart != null && undefined != this.developerCallback.onNativeAdVideoStart) {
-                this.developerCallback.onNativeAdVideoStart(placementId,);
-            }
-        },
-
-        onNativeAdVideoEnd : function(placementId) {
-            if(this.developerCallback != null && this.developerCallback.onNativeAdVideoEnd != null && undefined !=this.developerCallback.onNativeAdVideoEnd) {
-                this.developerCallback.onNativeAdVideoEnd(placementId);
-            }
-        },
-
-        onNativeAdCloseButtonTapped : function(placementId, callbackInfo) {
-            if(this.developerCallback != null && this.developerCallback.onNativeAdCloseButtonTapped != null && undefined != this.developerCallback.onNativeAdCloseButtonTapped) {
-                this.developerCallback.onNativeAdCloseButtonTapped(placementId, callbackInfo);
-            }
-        }
-        
-    },
-    
-    loadNative : function(placementId, settings={}) {
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.loadNative(placementId, JSON.stringify(settings));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setAdListener : function(listener) {
-        var eventJSON = {};
-        eventJSON[LoadedCallbackKey]="ATNativeJSSDK.ATNativeListener.onNativeAdLoaded",
-        eventJSON[LoadFailCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdLoadFail",
-        eventJSON[CloseCallbackKey]="ATNativeJSSDK.ATNativeListener.onNativeAdCloseButtonTapped",
-        eventJSON[ClickCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdClick",
-        eventJSON[ShowCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdShow",
-        eventJSON[VideoStartKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdVideoStart",
-        eventJSON[VideoEndKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdVideoEnd"
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.setAdListener(JSON.stringify(eventJSON));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-
-        this.ATNativeListener.developerCallback = listener;
-    },
-
-    hasAdReady : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-            return platformBridge.hasAdReady(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-        return false;
-    },
-
-    showAd : function(placementId, adViewProperty) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAd(placementId, JSON.stringify(adViewProperty.getAdViewProperty()));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    removeAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.removeAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    createLoadAdSize : function(width, height) {
-        var loadAdSize = {};
-        loadAdSize["width"] = width;
-        loadAdSize["height"] = height;
-        return loadAdSize;
-    },
-
-    AdViewProperty : cc.Class({
-
-        parent : null,
-        appIcon : null,
-        mainImage: null,
-        title:null,
-        desc:null,
-        adLogo:null,
-        cta:null,
-        rating:null,
-
-        createItemViewProperty: function(x, y ,width ,height ,backgroundColor ,textColor ,textSize) {
-            var itemProperty = {};
-            itemProperty["x"] = x;
-            itemProperty["y"] = y;
-            itemProperty["width"] = width;
-            itemProperty["height"] = height;
-            itemProperty["backgroundColor"] = backgroundColor;
-            itemProperty["textColor"] = textColor;
-            itemProperty["textSize"] = textSize;
-
-            return itemProperty;
-        },
-
-        getAdViewProperty: function() {
-            var nativeViewProperty = {};
-
-            if(this.parent != null){
-                nativeViewProperty["parent"] = this.parent; 
-            }
-            
-            if(this.appIcon != null){
-                nativeViewProperty["icon"] = this.appIcon;
-            }
-            
-            if(this.mainImage != null){
-                nativeViewProperty["mainImage"] = this.mainImage;
-            }
-           
-            if(this.title != null){
-                nativeViewProperty["title"] = this.title;
-            }
-           
-            if(this.desc != null){
-                nativeViewProperty["desc"] = this.desc;
-            }
-
-            if(this.adLogo != null){
-                nativeViewProperty["adLogo"] = this.adLogo;
-            }
-
-            if(this.cta != null){
-                nativeViewProperty["cta"] = this.cta;
-            }
-
-            if(this.rating != null){
-                nativeViewProperty["rating"] = this.rating;
-            }
-           
-            return nativeViewProperty;
-        }
-    })
-  
-};
-
-const LoadedCallbackKey = "NativeLoaded";
-const LoadFailCallbackKey = "NativeLoadFail";
-const CloseCallbackKey = "NativeCloseButtonTapped";
-const ClickCallbackKey = "NativeClick";
-const ShowCallbackKey = "NativeShow";
-const VideoStartKey = "NativeVideoStart";
-const VideoEndKey = "NativeVideoEnd";
-
+
+var ATAndroidNativeJS = require("./Android/ATAndroidNativeJS");
+var ATiOSNativeJS = require("./iOS/ATiOSNativeJS");
+var initPlatformBridge = function() {  
+    if (cc.sys.os === cc.sys.OS_IOS) {           
+        return ATiOSNativeJS;
+    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
+        return ATAndroidNativeJS;
+    }
+};
+
+var platformBridge = initPlatformBridge();
+
+
+var ATNativeSDK = ATNativeSDK || {   
+
+    ATNativeListener : {
+        developerCallback : null,
+
+        onNativeAdLoaded : function (placementId) {
+            if(this.developerCallback != null && this.developerCallback.onNativeAdLoaded != null && undefined != this.developerCallback.onNativeAdLoaded) {
+                this.developerCallback.onNativeAdLoaded(placementId);
+            }
+        },
+
+        onNativeAdLoadFail : function(placementId, errorInfo) {
+          if(this.developerCallback != null && this.developerCallback.onNativeAdLoadFail != null && undefined != this.developerCallback.onNativeAdLoadFail) {
+                this.developerCallback.onNativeAdLoadFail(placementId, errorInfo);
+            }
+        },
+
+        onNativeAdShow : function(placementId, callbackInfo) {
+           if(this.developerCallback != null && this.developerCallback.onNativeAdShow != null && undefined != this.developerCallback.onNativeAdShow) {
+                this.developerCallback.onNativeAdShow(placementId, callbackInfo);
+            }
+        },
+
+        onNativeAdClick : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onNativeAdClick != null && undefined != this.developerCallback.onNativeAdClick) {
+                this.developerCallback.onNativeAdClick(placementId, callbackInfo);
+            }
+        },
+
+        onNativeAdVideoStart : function(placementId) {
+            if(this.developerCallback != null && this.developerCallback.onNativeAdVideoStart != null && undefined != this.developerCallback.onNativeAdVideoStart) {
+                this.developerCallback.onNativeAdVideoStart(placementId,);
+            }
+        },
+
+        onNativeAdVideoEnd : function(placementId) {
+            if(this.developerCallback != null && this.developerCallback.onNativeAdVideoEnd != null && undefined !=this.developerCallback.onNativeAdVideoEnd) {
+                this.developerCallback.onNativeAdVideoEnd(placementId);
+            }
+        },
+
+        onNativeAdCloseButtonTapped : function(placementId, callbackInfo) {
+            if(this.developerCallback != null && this.developerCallback.onNativeAdCloseButtonTapped != null && undefined != this.developerCallback.onNativeAdCloseButtonTapped) {
+                this.developerCallback.onNativeAdCloseButtonTapped(placementId, callbackInfo);
+            }
+        }
+        
+    },
+    
+    loadNative : function(placementId, settings={}) {
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.loadNative(placementId, JSON.stringify(settings));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setAdListener : function(listener) {
+        var eventJSON = {};
+        eventJSON[LoadedCallbackKey]="ATNativeJSSDK.ATNativeListener.onNativeAdLoaded",
+        eventJSON[LoadFailCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdLoadFail",
+        eventJSON[CloseCallbackKey]="ATNativeJSSDK.ATNativeListener.onNativeAdCloseButtonTapped",
+        eventJSON[ClickCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdClick",
+        eventJSON[ShowCallbackKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdShow",
+        eventJSON[VideoStartKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdVideoStart",
+        eventJSON[VideoEndKey]= "ATNativeJSSDK.ATNativeListener.onNativeAdVideoEnd"
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.setAdListener(JSON.stringify(eventJSON));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+
+        this.ATNativeListener.developerCallback = listener;
+    },
+
+    hasAdReady : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.hasAdReady(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return false;
+    },
+
+    checkAdStatus : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.checkAdStatus(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return "";
+    },
+
+    showAd : function(placementId, adViewProperty) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAd(placementId, JSON.stringify(adViewProperty.getAdViewProperty()));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInScenario : function(placementId, adViewProperty, scenario="") {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInScenario(placementId, JSON.stringify(adViewProperty.getAdViewProperty()), scenario);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    removeAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.removeAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    createLoadAdSize : function(width, height) {
+        var loadAdSize = {};
+        loadAdSize["width"] = width;
+        loadAdSize["height"] = height;
+        return loadAdSize;
+    },
+
+    AdViewProperty : cc.Class({
+
+        parent : null,
+        appIcon : null,
+        mainImage: null,
+        title:null,
+        desc:null,
+        adLogo:null,
+        cta:null,
+        rating:null,
+        dislike:null,
+
+        createItemViewProperty: function(x, y ,width ,height ,backgroundColor ,textColor ,textSize, isCustomClick = false) {
+            var itemProperty = {};
+            itemProperty["x"] = x;
+            itemProperty["y"] = y;
+            itemProperty["width"] = width;
+            itemProperty["height"] = height;
+            itemProperty["backgroundColor"] = backgroundColor;
+            itemProperty["textColor"] = textColor;
+            itemProperty["textSize"] = textSize;
+            itemProperty["isCustomClick"] = isCustomClick;
+
+            return itemProperty;
+        },
+
+        getAdViewProperty: function() {
+            var nativeViewProperty = {};
+
+            if(this.parent != null){
+                nativeViewProperty["parent"] = this.parent; 
+            }
+            
+            if(this.appIcon != null){
+                nativeViewProperty["icon"] = this.appIcon;
+            }
+            
+            if(this.mainImage != null){
+                nativeViewProperty["mainImage"] = this.mainImage;
+            }
+           
+            if(this.title != null){
+                nativeViewProperty["title"] = this.title;
+            }
+           
+            if(this.desc != null){
+                nativeViewProperty["desc"] = this.desc;
+            }
+
+            if(this.adLogo != null){
+                nativeViewProperty["adLogo"] = this.adLogo;
+            }
+
+            if(this.cta != null){
+                nativeViewProperty["cta"] = this.cta;
+            }
+
+            if(this.rating != null){
+                nativeViewProperty["rating"] = this.rating;
+            }
+
+            if(this.dislike != null){
+                nativeViewProperty["dislike"] = this.dislike;
+            }
+           
+            return nativeViewProperty;
+        }
+    })
+  
+};
+
+const LoadedCallbackKey = "NativeLoaded";
+const LoadFailCallbackKey = "NativeLoadFail";
+const CloseCallbackKey = "NativeCloseButtonTapped";
+const ClickCallbackKey = "NativeClick";
+const ShowCallbackKey = "NativeShow";
+const VideoStartKey = "NativeVideoStart";
+const VideoEndKey = "NativeVideoEnd";
+
 window.ATNativeJSSDK = ATNativeSDK;

+ 146 - 137
assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATRewardedVideoJSSDK.js

@@ -1,138 +1,147 @@
-var ATAndroidRewardedVideoJS = require("./Android/ATAndroidRewardedVideoJS");
-var ATiOSRewardedVideoJS = require("./iOS/ATiOSRewardedVideoJS");
-
-var initPlatformBridge = function() {  
-    if (cc.sys.os === cc.sys.OS_IOS) {           
-        return ATiOSRewardedVideoJS;
-    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
-        return ATAndroidRewardedVideoJS;
-    }
-};
-
-var platformBridge = initPlatformBridge();
-
-
-var ATRewardedVideoSDK = ATRewardedVideoSDK || {
-    userIdKey: "userID",
-    userDataKey: "media_ext",
-
-    ATRewardedVideoListener : {
-        developerCallback : null,
-
-        onRewardedVideoAdLoaded : function (placementId) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdLoaded(" + placementId + ")");
-            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdLoaded != null && undefined != this.developerCallback.onRewardedVideoAdLoaded) {
-                this.developerCallback.onRewardedVideoAdLoaded(placementId);
-            }
-        },
-        onRewardedVideoAdFailed : function(placementId, errorInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")");
-          if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdFailed != null && undefined != this.developerCallback.onRewardedVideoAdFailed) {
-                this.developerCallback.onRewardedVideoAdFailed(placementId, errorInfo);
-            }
-        },
-        onRewardedVideoAdPlayStart : function(placementId, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")");
-           if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayStart != null && undefined != this.developerCallback.onRewardedVideoAdPlayStart) {
-                this.developerCallback.onRewardedVideoAdPlayStart(placementId, callbackInfo);
-            }
-        },
-        onRewardedVideoAdPlayEnd : function(placementId, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")");
-            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayEnd != null && undefined != this.developerCallback.onRewardedVideoAdPlayEnd) {
-                this.developerCallback.onRewardedVideoAdPlayEnd(placementId, callbackInfo);
-            }
-        },
-        onRewardedVideoAdPlayFailed : function(placementId, errorInfo, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayFailed(" + placementId + ", " + callbackInfo + ")");
-            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayFailed != null && undefined != this.developerCallback.onRewardedVideoAdPlayFailed) {
-                this.developerCallback.onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo);
-            }
-        },
-        onRewardedVideoAdClosed : function(placementId, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
-            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdClosed != null && undefined != this.developerCallback.onRewardedVideoAdClosed) {
-                this.developerCallback.onRewardedVideoAdClosed(placementId, callbackInfo);
-            }
-        },
-        onRewardedVideoAdPlayClicked : function(placementId, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")");
-            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayClicked != null && undefined != this.developerCallback.onRewardedVideoAdPlayClicked) {
-                this.developerCallback.onRewardedVideoAdPlayClicked(placementId, callbackInfo);
-            }
-        },
-        onReward : function(placementId, callbackInfo) {
-            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onReward(" + placementId + ", " + callbackInfo + ")");
-            if(this.developerCallback != null && this.developerCallback.onReward != null && undefined != this.developerCallback.onReward) {
-                this.developerCallback.onReward(placementId, callbackInfo);
-            }
-        }
-    },
-    
-    loadRewardedVideo : function(placementId, settings={}) {
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.loadRewardedVideo(placementId, JSON.stringify(settings));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    setAdListener : function(listener) {
-        var eventJSON = {};
-        eventJSON[LoadedCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdLoaded",
-        eventJSON[LoadFailCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdFailed",
-        eventJSON[PlayStartCallbackKey]=  "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayStart",
-        eventJSON[PlayEndCallbackKey]=  "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayEnd",
-        eventJSON[PlayFailCallbackKey] = "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayFailed",
-        eventJSON[CloseCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdClosed",
-        eventJSON[ClickCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayClicked",
-        eventJSON[RewardCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onReward"
-
-        if (undefined != platformBridge && platformBridge != null) {
-            platformBridge.setAdListener(JSON.stringify(eventJSON));
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-
-        this.ATRewardedVideoListener.developerCallback = listener;
-    },
-
-    hasAdReady : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-            return platformBridge.hasAdReady(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-        return false;
-    },
-
-    showAd : function(placementId) {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAd(placementId);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    },
-
-    showAdInScenario : function(placementId, scenario="") {
-        if (undefined != platformBridge && platformBridge != null) {
-           platformBridge.showAdInScenario(placementId, scenario);
-        } else {
-            cc.log("You must run on Android or iOS.");
-        }
-    } 
-  
-};
-
-const LoadedCallbackKey = "RewardedVideoLoaded";
-const LoadFailCallbackKey = "RewardedVideoLoadFail";
-const PlayStartCallbackKey = "RewardedVideoPlayStart";
-const PlayEndCallbackKey = "RewardedVideoPlayEnd";
-const PlayFailCallbackKey = "RewardedVideoPlayFail";
-const CloseCallbackKey = "RewardedVideoClose";
-const ClickCallbackKey = "RewardedVideoClick";
-const RewardCallbackKey = "RewardedVideoReward";
-
-
+var ATAndroidRewardedVideoJS = require("./Android/ATAndroidRewardedVideoJS");
+var ATiOSRewardedVideoJS = require("./iOS/ATiOSRewardedVideoJS");
+
+var initPlatformBridge = function() {  
+    if (cc.sys.os === cc.sys.OS_IOS) {           
+        return ATiOSRewardedVideoJS;
+    } else if (cc.sys.os === cc.sys.OS_ANDROID) {
+        return ATAndroidRewardedVideoJS;
+    }
+};
+
+var platformBridge = initPlatformBridge();
+
+
+var ATRewardedVideoSDK = ATRewardedVideoSDK || {
+    userIdKey: "userID",
+    userDataKey: "media_ext",
+
+    ATRewardedVideoListener : {
+        developerCallback : null,
+
+        onRewardedVideoAdLoaded : function (placementId) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdLoaded(" + placementId + ")");
+            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdLoaded != null && undefined != this.developerCallback.onRewardedVideoAdLoaded) {
+                this.developerCallback.onRewardedVideoAdLoaded(placementId);
+            }
+        },
+        onRewardedVideoAdFailed : function(placementId, errorInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")");
+          if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdFailed != null && undefined != this.developerCallback.onRewardedVideoAdFailed) {
+                this.developerCallback.onRewardedVideoAdFailed(placementId, errorInfo);
+            }
+        },
+        onRewardedVideoAdPlayStart : function(placementId, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")");
+           if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayStart != null && undefined != this.developerCallback.onRewardedVideoAdPlayStart) {
+                this.developerCallback.onRewardedVideoAdPlayStart(placementId, callbackInfo);
+            }
+        },
+        onRewardedVideoAdPlayEnd : function(placementId, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")");
+            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayEnd != null && undefined != this.developerCallback.onRewardedVideoAdPlayEnd) {
+                this.developerCallback.onRewardedVideoAdPlayEnd(placementId, callbackInfo);
+            }
+        },
+        onRewardedVideoAdPlayFailed : function(placementId, errorInfo, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayFailed(" + placementId + ", " + callbackInfo + ")");
+            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayFailed != null && undefined != this.developerCallback.onRewardedVideoAdPlayFailed) {
+                this.developerCallback.onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo);
+            }
+        },
+        onRewardedVideoAdClosed : function(placementId, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
+            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdClosed != null && undefined != this.developerCallback.onRewardedVideoAdClosed) {
+                this.developerCallback.onRewardedVideoAdClosed(placementId, callbackInfo);
+            }
+        },
+        onRewardedVideoAdPlayClicked : function(placementId, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")");
+            if(this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayClicked != null && undefined != this.developerCallback.onRewardedVideoAdPlayClicked) {
+                this.developerCallback.onRewardedVideoAdPlayClicked(placementId, callbackInfo);
+            }
+        },
+        onReward : function(placementId, callbackInfo) {
+            ATJSSDK.printLog("ATRewardedVideoJSSDK.ATRewardedVideoListener.onReward(" + placementId + ", " + callbackInfo + ")");
+            if(this.developerCallback != null && this.developerCallback.onReward != null && undefined != this.developerCallback.onReward) {
+                this.developerCallback.onReward(placementId, callbackInfo);
+            }
+        }
+    },
+    
+    loadRewardedVideo : function(placementId, settings={}) {
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.loadRewardedVideo(placementId, JSON.stringify(settings));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    setAdListener : function(listener) {
+        var eventJSON = {};
+        eventJSON[LoadedCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdLoaded",
+        eventJSON[LoadFailCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdFailed",
+        eventJSON[PlayStartCallbackKey]=  "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayStart",
+        eventJSON[PlayEndCallbackKey]=  "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayEnd",
+        eventJSON[PlayFailCallbackKey] = "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayFailed",
+        eventJSON[CloseCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdClosed",
+        eventJSON[ClickCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onRewardedVideoAdPlayClicked",
+        eventJSON[RewardCallbackKey]= "ATRewardedVideoJSSDK.ATRewardedVideoListener.onReward"
+
+        if (undefined != platformBridge && platformBridge != null) {
+            platformBridge.setAdListener(JSON.stringify(eventJSON));
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+
+        this.ATRewardedVideoListener.developerCallback = listener;
+    },
+
+    hasAdReady : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.hasAdReady(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return false;
+    },
+
+    checkAdStatus : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+            return platformBridge.checkAdStatus(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+        return "";
+    },
+
+    showAd : function(placementId) {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAd(placementId);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    },
+
+    showAdInScenario : function(placementId, scenario="") {
+        if (undefined != platformBridge && platformBridge != null) {
+           platformBridge.showAdInScenario(placementId, scenario);
+        } else {
+            cc.log("You must run on Android or iOS.");
+        }
+    } 
+  
+};
+
+const LoadedCallbackKey = "RewardedVideoLoaded";
+const LoadFailCallbackKey = "RewardedVideoLoadFail";
+const PlayStartCallbackKey = "RewardedVideoPlayStart";
+const PlayEndCallbackKey = "RewardedVideoPlayEnd";
+const PlayFailCallbackKey = "RewardedVideoPlayFail";
+const CloseCallbackKey = "RewardedVideoClose";
+const ClickCallbackKey = "RewardedVideoClick";
+const RewardCallbackKey = "RewardedVideoReward";
+
+
 window.ATRewardedVideoJSSDK = ATRewardedVideoSDK;

+ 60 - 45
assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidBannerJS.js

@@ -1,46 +1,61 @@
-var classJavaName = "com/anythink/cocosjs/ATBannerJSBridge";
-var ATAndroidBannerJS = ATAndroidBannerJS || {
-  
-    loadBanner : function (placementId, settings) {
-        cc.log("Android-loadBanner:" + settings);
-		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
-    },
-
-    setAdListener : function (listener) {
-        cc.log("Android-setAdListener");
-		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
-    },
-
-    hasAdReady : function (placementId) {
-         cc.log("Android-hasAdReady");
-        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);;
-    },
-
-    showAdInPosition : function(placementId, position) {
-        cc.log("Android-showAdInPosistion");
-		jsb.reflection.callStaticMethod(classJavaName, "showWithPosition", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, position);
-    },
-
-    showAdInRectangle : function(placementId, showAdRect) {
-        cc.log("Android-showAdInRectangle");
-		jsb.reflection.callStaticMethod(classJavaName, "showWithRect", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, showAdRect);
-    },
-    
-    removeAd : function(placementId) {
-         cc.log("Android-removeAd");
-		 jsb.reflection.callStaticMethod(classJavaName, "remove", "(Ljava/lang/String;)V", placementId);
-    },
-
-    reShowAd : function(placementId) {
-        cc.log("Android-reShowAd");
-		jsb.reflection.callStaticMethod(classJavaName, "reshow", "(Ljava/lang/String;)V", placementId);
-    },
-
-    hideAd : function(placementId) {
-         cc.log("Android-hideAd");
-		 jsb.reflection.callStaticMethod(classJavaName, "hide", "(Ljava/lang/String;)V", placementId);
-    }
-  
-};
-
+var classJavaName = "com/anythink/cocosjs/ATBannerJSBridge";
+var ATAndroidBannerJS = ATAndroidBannerJS || {
+  
+    loadBanner : function (placementId, settings) {
+        cc.log("Android-loadBanner:" + settings);
+		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
+    },
+
+    setAdListener : function (listener) {
+        cc.log("Android-setAdListener");
+		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
+    },
+
+    hasAdReady : function (placementId) {
+         cc.log("Android-hasAdReady");
+        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);;
+    },
+
+    checkAdStatus : function(placementId) {
+        cc.log("Android-checkAdStatus:" + placementId);
+        return jsb.reflection.callStaticMethod(classJavaName, "checkAdStatus", "(Ljava/lang/String;)Ljava/lang/String;", placementId);
+    },
+
+    showAdInPosition : function(placementId, position) {
+        cc.log("Android-showAdInPosistion");
+		jsb.reflection.callStaticMethod(classJavaName, "showWithPosition", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, position, "");
+    },
+
+    showAdInPositionAndScenario : function(placementId, position, scenario) {
+        cc.log("Android-showAdInPositionAndScenario");
+        jsb.reflection.callStaticMethod(classJavaName, "showWithPosition", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, position, scenario);
+    },
+
+    showAdInRectangle : function(placementId, showAdRect) {
+        cc.log("Android-showAdInRectangle");
+		jsb.reflection.callStaticMethod(classJavaName, "showWithRect", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, showAdRect, "");
+    },
+
+    showAdInRectangleAndScenario : function(placementId, showAdRect, scenario) {
+        cc.log("Android-showAdInRectangleAndScenario");
+        jsb.reflection.callStaticMethod(classJavaName, "showWithRect", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, showAdRect, scenario);
+    },
+    
+    removeAd : function(placementId) {
+         cc.log("Android-removeAd");
+		 jsb.reflection.callStaticMethod(classJavaName, "remove", "(Ljava/lang/String;)V", placementId);
+    },
+
+    reShowAd : function(placementId) {
+        cc.log("Android-reShowAd");
+		jsb.reflection.callStaticMethod(classJavaName, "reshow", "(Ljava/lang/String;)V", placementId);
+    },
+
+    hideAd : function(placementId) {
+         cc.log("Android-hideAd");
+		 jsb.reflection.callStaticMethod(classJavaName, "hide", "(Ljava/lang/String;)V", placementId);
+    }
+  
+};
+
 module.exports = ATAndroidBannerJS;

+ 35 - 30
assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidInterstitialJS.js

@@ -1,31 +1,36 @@
-var classJavaName = "com/anythink/cocosjs/ATInterstitialJSBridge";
-var ATAndroidInterstitialJS = ATAndroidInterstitialJS || {
-	
-	loadInterstitial : function (placementId, settings) {
-        cc.log("Android-loadInterstitial");
-		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
-    },
-
-    setAdListener : function (listener) {
-        cc.log("Android-setAdListener");
-		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
-    },
-
-    hasAdReady : function (placementId) {
-         cc.log("Android-hasAdReady");
-        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);
-    },
-
-    showAd : function(placementId) {
-        cc.log("Android-showAd:" + placementId);
-		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;)V", placementId);
-    },
-
-    showAdInScenario : function(placementId, scenario) {
-         cc.log("Android-showAdInScenario:" + placementId + "---" + scenario);
-		 jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, scenario);
-    } 
-  
-};
-
+var classJavaName = "com/anythink/cocosjs/ATInterstitialJSBridge";
+var ATAndroidInterstitialJS = ATAndroidInterstitialJS || {
+	
+	loadInterstitial : function (placementId, settings) {
+        cc.log("Android-loadInterstitial");
+		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
+    },
+
+    setAdListener : function (listener) {
+        cc.log("Android-setAdListener");
+		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
+    },
+
+    hasAdReady : function (placementId) {
+         cc.log("Android-hasAdReady");
+        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);
+    },
+
+    checkAdStatus : function(placementId) {
+        cc.log("Android-checkAdStatus:" + placementId);
+        return jsb.reflection.callStaticMethod(classJavaName, "checkAdStatus", "(Ljava/lang/String;)Ljava/lang/String;", placementId);
+    },
+
+    showAd : function(placementId) {
+        cc.log("Android-showAd:" + placementId);
+		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;)V", placementId);
+    },
+
+    showAdInScenario : function(placementId, scenario) {
+         cc.log("Android-showAdInScenario:" + placementId + "---" + scenario);
+		 jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, scenario);
+    }
+
+};
+
 module.exports = ATAndroidInterstitialJS;

+ 46 - 42
assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidJS.js

@@ -1,43 +1,47 @@
-var classJavaName = "com/anythink/cocosjs/ATJSBridge";
-var ATAndroidJS = ATAndroidJS || {
-    printJsLog : function(msg) {
-        if (undefined != msg && msg != null) {
-            jsb.reflection.callStaticMethod("android/util/Log", "i", "(Ljava/lang/String;Ljava/lang/String;)I", "AT-Cocos-JS", msg);
-        }
-    },
-
-    initSDK : function(appid, appkey) {
-        jsb.reflection.callStaticMethod(classJavaName, "initSDK", "(Ljava/lang/String;Ljava/lang/String;)V", appid, appkey);
-    },
-
-    initCustomMap : function(customMap) {      
-        jsb.reflection.callStaticMethod(classJavaName, "initCustomMap", "(Ljava/lang/String;)V", customMap);
-    },
-
-    setPlacementCustomMap : function(placmentId, customMap) {
-        jsb.reflection.callStaticMethod(classJavaName, "setPlacementCustomMap", "(Ljava/lang/String;Ljava/lang/String;)V", placmentId, customMap);
-    },
-
-    setGDPRLevel : function(level) {
-        jsb.reflection.callStaticMethod(classJavaName, "setGDPRLevel", "(I)V", level);
-    },
-
-    getGDPRLevel : function() {
-        return jsb.reflection.callStaticMethod(classJavaName, "getGDPRLevel", "()I");
-    },
-
-    getUserLocation : function(callbackMethod) {
-        jsb.reflection.callStaticMethod(classJavaName, "getUserLocation", "(Ljava/lang/String;)V", callbackMethod);
-    },
-
-    showGDPRAuth : function () {
-        jsb.reflection.callStaticMethod(classJavaName, "showGDPRAuth", "()V");
-    },
-
-    setLogDebug : function (debug) {
-        jsb.reflection.callStaticMethod(classJavaName, "setLogDebug", "(Z)V", debug);
-    }
-  
-};
-
+var classJavaName = "com/anythink/cocosjs/ATJSBridge";
+var ATAndroidJS = ATAndroidJS || {
+    printJsLog : function(msg) {
+        if (undefined != msg && msg != null) {
+            jsb.reflection.callStaticMethod("android/util/Log", "i", "(Ljava/lang/String;Ljava/lang/String;)I", "AT-Cocos-JS", msg);
+        }
+    },
+
+    initSDK : function(appid, appkey) {
+        jsb.reflection.callStaticMethod(classJavaName, "initSDK", "(Ljava/lang/String;Ljava/lang/String;)V", appid, appkey);
+    },
+
+    initCustomMap : function(customMap) {      
+        jsb.reflection.callStaticMethod(classJavaName, "initCustomMap", "(Ljava/lang/String;)V", customMap);
+    },
+
+    setPlacementCustomMap : function(placmentId, customMap) {
+        jsb.reflection.callStaticMethod(classJavaName, "setPlacementCustomMap", "(Ljava/lang/String;Ljava/lang/String;)V", placmentId, customMap);
+    },
+
+    setGDPRLevel : function(level) {
+        jsb.reflection.callStaticMethod(classJavaName, "setGDPRLevel", "(I)V", level);
+    },
+
+    getGDPRLevel : function() {
+        return jsb.reflection.callStaticMethod(classJavaName, "getGDPRLevel", "()I");
+    },
+
+    getUserLocation : function(callbackMethod) {
+        jsb.reflection.callStaticMethod(classJavaName, "getUserLocation", "(Ljava/lang/String;)V", callbackMethod);
+    },
+
+    showGDPRAuth : function () {
+        jsb.reflection.callStaticMethod(classJavaName, "showGDPRAuth", "()V");
+    },
+
+    setLogDebug : function (debug) {
+        jsb.reflection.callStaticMethod(classJavaName, "setLogDebug", "(Z)V", debug);
+    },
+
+    deniedUploadDeviceInfo : function (deniedInfo) {
+        jsb.reflection.callStaticMethod(classJavaName, "deniedUploadDeviceInfo", "(Ljava/lang/String;)V", deniedInfo);
+    }
+  
+};
+
 module.exports = ATAndroidJS;

+ 40 - 30
assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidNativeJS.js

@@ -1,31 +1,41 @@
-var classJavaName = "com/anythink/cocosjs/ATNativeJSBridge";
-var ATAndroidBannerJS = ATAndroidBannerJS || {
-  
-    loadNative : function (placementId, settings) {
-        cc.log("Android-loadNative");
-		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
-    },
-
-    setAdListener : function (listener) {
-        cc.log("Android-setAdListener");
-		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
-    },
-
-    hasAdReady : function (placementId) {
-         cc.log("Android-hasAdReady");
-        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);;
-    },
-
-    showAd : function(placementId, adViewProperty) {
-        cc.log("Android-showAd");
-		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, adViewProperty);
-    },
-    
-    removeAd : function(placementId) {
-         cc.log("Android-removeAd");
-		 jsb.reflection.callStaticMethod(classJavaName, "remove", "(Ljava/lang/String;)V", placementId);
-    }
-  
-};
-
+var classJavaName = "com/anythink/cocosjs/ATNativeJSBridge";
+var ATAndroidBannerJS = ATAndroidBannerJS || {
+  
+    loadNative : function (placementId, settings) {
+        cc.log("Android-loadNative");
+		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
+    },
+
+    setAdListener : function (listener) {
+        cc.log("Android-setAdListener");
+		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
+    },
+
+    hasAdReady : function (placementId) {
+         cc.log("Android-hasAdReady");
+        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);;
+    },
+
+    checkAdStatus : function(placementId) {
+        cc.log("Android-checkAdStatus:" + placementId);
+        return jsb.reflection.callStaticMethod(classJavaName, "checkAdStatus", "(Ljava/lang/String;)Ljava/lang/String;", placementId);
+    },
+
+    showAd : function(placementId, adViewProperty) {
+        cc.log("Android-showAd");
+		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, adViewProperty, "");
+    },
+
+    showAdInScenario : function(placementId, adViewProperty, scenario) {
+        cc.log("Android-showAdInScenario");
+        jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", placementId, adViewProperty, scenario);
+    },
+
+    removeAd : function(placementId) {
+         cc.log("Android-removeAd");
+		 jsb.reflection.callStaticMethod(classJavaName, "remove", "(Ljava/lang/String;)V", placementId);
+    }
+  
+};
+
 module.exports = ATAndroidBannerJS;

+ 35 - 30
assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidRewardedVideoJS.js

@@ -1,31 +1,36 @@
-var classJavaName = "com/anythink/cocosjs/ATRewardedVideoJSBridge";
-var ATAndroidRewardedVideoJS = ATAndroidRewardedVideoJS || {
-  
-    loadRewardedVideo : function (placementId, settings) {
-        cc.log("Android-loadRewardedVideo");
-		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
-    },
-
-    setAdListener : function (listener) {
-        cc.log("Android-setAdListener");
-		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
-    },
-
-    hasAdReady : function (placementId) {
-        cc.log("Android-hasAdReady");
-        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);
-    },
-
-    showAd : function(placementId) {
-        cc.log("Android-rv_showAd:" + placementId);
-		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;)V", placementId);
-    },
-
-    showAdInScenario : function(placementId, scenario) {
-        cc.log("Android-rv_showAdInScenario:" + placementId + "---" + scenario);
-		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, scenario);
-    } 
-  
-};
-
+var classJavaName = "com/anythink/cocosjs/ATRewardedVideoJSBridge";
+var ATAndroidRewardedVideoJS = ATAndroidRewardedVideoJS || {
+  
+    loadRewardedVideo : function (placementId, settings) {
+        cc.log("Android-loadRewardedVideo");
+		jsb.reflection.callStaticMethod(classJavaName, "load", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, settings);
+    },
+
+    setAdListener : function (listener) {
+        cc.log("Android-setAdListener");
+		jsb.reflection.callStaticMethod(classJavaName, "setAdListener", "(Ljava/lang/String;)V", listener);
+    },
+
+    hasAdReady : function (placementId) {
+        cc.log("Android-hasAdReady");
+        return jsb.reflection.callStaticMethod(classJavaName, "isAdReady", "(Ljava/lang/String;)Z", placementId);
+    },
+
+    checkAdStatus : function(placementId) {
+        cc.log("Android-checkAdStatus:" + placementId);
+        return jsb.reflection.callStaticMethod(classJavaName, "checkAdStatus", "(Ljava/lang/String;)Ljava/lang/String;", placementId);
+    },
+
+    showAd : function(placementId) {
+        cc.log("Android-rv_showAd:" + placementId);
+		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;)V", placementId);
+    },
+
+    showAdInScenario : function(placementId, scenario) {
+        cc.log("Android-rv_showAdInScenario:" + placementId + "---" + scenario);
+		jsb.reflection.callStaticMethod(classJavaName, "show", "(Ljava/lang/String;Ljava/lang/String;)V", placementId, scenario);
+    }
+  
+};
+
 module.exports = ATAndroidRewardedVideoJS;

+ 60 - 45
assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSBannerJS.js

@@ -1,45 +1,60 @@
-var ATiOSJS = require("ATiOSJS");
-const OC_WRAPPER_CLASS = "ATBannerAdWrapper";
-var ATiOSBannerJS = ATiOSBannerJS || {
-    loadBanner: function(placementId, extra) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::loadBanner(" + placementId + ", " + extra + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadBannerWithPlacementID:extra:", placementId, extra);
-    },
-
-    setAdListener : function (listener) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::setAdListener(" + listener + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
-    },
-  
-    hasAdReady : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::hasAdReady(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "bannerReadyForPlacementID:", placementId);
-    },
-
-    showAdInPosition : function(placementId, position) { 
-        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInPosition(" + placementId + ", " + position + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:position:", placementId, position);
-    },
-
-    showAdInRectangle : function(placementId, showAdRect) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInRectangle(" + placementId + ", " + showAdRect + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:rect:", placementId, showAdRect);
-    },
-
-    removeAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::removeAd(" + placementId + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "removeAd:", placementId);
-    },
-
-    reShowAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::reShowAd(" + placementId + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "reShowAd:", placementId);
-    },
-
-    hideAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::hideAd(" + placementId + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "hideAd:", placementId);
-    }
-};
-
-module.exports = ATiOSBannerJS;
+var ATiOSJS = require("ATiOSJS");
+const OC_WRAPPER_CLASS = "ATBannerAdWrapper";
+var ATiOSBannerJS = ATiOSBannerJS || {
+    loadBanner: function(placementId, extra) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::loadBanner(" + placementId + ", " + extra + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadBannerWithPlacementID:extra:", placementId, extra);
+    },
+
+    setAdListener : function (listener) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::setAdListener(" + listener + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
+    },
+  
+    hasAdReady : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::hasAdReady(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "bannerReadyForPlacementID:", placementId);
+    },
+
+    checkAdStatus : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::checkAdStatus(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "bannerCheckAdStatusForPlacementID:", placementId);
+    },
+
+    showAdInPosition : function(placementId, position) { 
+        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInPosition(" + placementId + ", " + position + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:scene:position:", placementId, null, position);
+    },
+
+    showAdInPositionAndScenario : function(placementId, position, scenario) { 
+        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInPositionAndScenario(" + placementId + ", " + position + ", " + scenario + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:scene:position:", placementId, scenario, position);
+    },
+
+    showAdInRectangle : function(placementId, showAdRect) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInRectangle(" + placementId + ", " + showAdRect + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:scene:rect:", placementId, null, showAdRect);
+    },
+
+    showAdInRectangleAndScenario : function(placementId, showAdRect, scenario) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::showAdInRectangleAndScenario(" + placementId + ", " + showAdRect + ", " + scenario + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showBannerWithPlacementID:scene:rect:", placementId, scenario, showAdRect);
+    },
+
+    removeAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::removeAd(" + placementId + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "removeAd:", placementId);
+    },
+
+    reShowAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::reShowAd(" + placementId + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "reShowAd:", placementId);
+    },
+
+    hideAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::hideAd(" + placementId + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "hideAd:", placementId);
+    }
+};
+
+module.exports = ATiOSBannerJS;

+ 40 - 35
assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSInterstitialJS.js

@@ -1,36 +1,41 @@
-var ATiOSJS = require("ATiOSJS");
-const OC_WRAPPER_CLASS = "ATInterstitialAdWrapper";
-var ATiOSInterstitialJS = ATiOSInterstitialJS || {
-    loadInterstitial : function (placementId, extra) {
-        ATiOSJS.printJsLog("ATiOSInterstitialJS::loadInterstitial(" + placementId + ", " + extra + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadInterstitialWithPlacementID:extra:", placementId, extra);
-    },
-
-    setAdListener : function (listener) {
-        ATiOSJS.printJsLog("ATiOSInterstitialJS::setAdListener(" + listener + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
-    },
-
-    hasAdReady : function (placementId) {
-        ATiOSJS.printJsLog("ATiOSInterstitialJS::hasAdReady(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "interstitialReadyForPlacementID:", placementId);
-    },
-
-    setUserData : function (placementId, userId, userData) {
-         cc.log("Android-setUserData");
-    },
-
-    showAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, null);
-        
-    },
-
-    showAdInScenario : function(placementId, scenario) {
-        ATiOSJS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId  + ", " + scenario + ")");
-        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, scenario);
-    } 
-  
-};
-
+var ATiOSJS = require("ATiOSJS");
+const OC_WRAPPER_CLASS = "ATInterstitialAdWrapper";
+var ATiOSInterstitialJS = ATiOSInterstitialJS || {
+    loadInterstitial : function (placementId, extra) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::loadInterstitial(" + placementId + ", " + extra + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadInterstitialWithPlacementID:extra:", placementId, extra);
+    },
+
+    setAdListener : function (listener) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::setAdListener(" + listener + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
+    },
+
+    hasAdReady : function (placementId) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::hasAdReady(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "interstitialReadyForPlacementID:", placementId);
+    },
+
+    checkAdStatus : function (placementId) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::checkAdStatus(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "checkAdStatus:", placementId);
+    },
+
+    setUserData : function (placementId, userId, userData) {
+         cc.log("Android-setUserData");
+    },
+
+    showAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, null);
+        
+    },
+
+    showAdInScenario : function(placementId, scenario) {
+        ATiOSJS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId  + ", " + scenario + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, scenario);
+    } 
+  
+};
+
 module.exports = ATiOSInterstitialJS;

+ 56 - 51
assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSJS.js

@@ -1,52 +1,57 @@
-const OC_ATSDK_MANAGER_CLASS = "ATSDKManager";
-const OC_BIRDGE_CLASS = "ATJSBridge";
-var ATiOSJS = ATiOSJS || {
-    initSDK : function(appid, appkey) {
-    	this.printJsLog("ATiOSJS::initSDK(" + appid + "," + appkey + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "startWithAppID:appKey:", appid, appkey);
-    },
-
-    initCustomMap : function(customMap) {
-        this.printJsLog("ATiOSJS::initCustomMap(" + customMap + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:", customMap);
-    },
-
-    setPlacementCustomMap : function(placmentId, customMap) {
-        this.printJsLog("ATiOSJS::setPlacementCustomMap(" + placmentId + ", " + customMap + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:forPlacementID:", customMap, placmentId);
-    },
-
-    setGDPRLevel : function(level) {
-        this.printJsLog("ATiOSJS::setGDPRLevel(" + level + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDataConsent:", level);
-    },
-
-    getGDPRLevel : function() {
-        this.printJsLog("ATiOSJS::getGDPRLevel()");
-        return jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "dataConsent");
-    },
-
-    getUserLocation : function(callbackMethod) {
-        this.printJsLog("ATiOSJS::getUserLocation(" + callbackMethod + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "getUserLocationWithCallback:", callbackMethod);
-    },
-
-    showGDPRAuth : function () {
-        this.printJsLog("ATiOSJS::showGDPRAuth()");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "presentDataConsentDialog");
-    },
-    
-    setLogDebug : function (debug) {
-        this.printJsLog("ATiOSJS::setLogDebug(" + debug + ")");
-        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDebugLog:", debug);
-    },
-    
-    printJsLog : function(msg) {
-        if (undefined != msg && msg != null) {
-            jsb.reflection.callStaticMethod(OC_BIRDGE_CLASS, "log:", msg);
-        }
-    }
-  
-};
-
+const OC_ATSDK_MANAGER_CLASS = "ATSDKManager";
+const OC_BIRDGE_CLASS = "ATJSBridge";
+var ATiOSJS = ATiOSJS || {
+    initSDK : function(appid, appkey) {
+    	this.printJsLog("ATiOSJS::initSDK(" + appid + "," + appkey + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "startWithAppID:appKey:", appid, appkey);
+    },
+
+    initCustomMap : function(customMap) {
+        this.printJsLog("ATiOSJS::initCustomMap(" + customMap + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:", customMap);
+    },
+
+    setPlacementCustomMap : function(placmentId, customMap) {
+        this.printJsLog("ATiOSJS::setPlacementCustomMap(" + placmentId + ", " + customMap + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:forPlacementID:", customMap, placmentId);
+    },
+
+    setGDPRLevel : function(level) {
+        this.printJsLog("ATiOSJS::setGDPRLevel(" + level + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDataConsent:", level);
+    },
+
+    getGDPRLevel : function() {
+        this.printJsLog("ATiOSJS::getGDPRLevel()");
+        return jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "dataConsent");
+    },
+
+    getUserLocation : function(callbackMethod) {
+        this.printJsLog("ATiOSJS::getUserLocation(" + callbackMethod + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "getUserLocationWithCallback:", callbackMethod);
+    },
+
+    showGDPRAuth : function () {
+        this.printJsLog("ATiOSJS::showGDPRAuth()");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "presentDataConsentDialog");
+    },
+    
+    setLogDebug : function (debug) {
+        this.printJsLog("ATiOSJS::setLogDebug(" + debug + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDebugLog:", debug);
+    },
+    
+    printJsLog : function(msg) {
+        if (undefined != msg && msg != null) {
+            jsb.reflection.callStaticMethod(OC_BIRDGE_CLASS, "log:", msg);
+        }
+    },
+
+    deniedUploadDeviceInfo : function (deniedInfo) {
+        this.printJsLog("ATiOSJS::deniedUploadDeviceInfo(" + deniedInfo + ")");
+        jsb.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "deniedUploadDeviceInfo:", deniedInfo);
+    }
+  
+};
+
 module.exports = ATiOSJS;

+ 40 - 30
assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSNativeJS.js

@@ -1,30 +1,40 @@
-var ATiOSJS = require("ATiOSJS");
-const OC_WRAPPER_CLASS = "ATNativeAdWrapper";
-var ATiOSNativeJS = ATiOSNativeJS || {
-    loadNative : function(placementId, settings) {
-        ATiOSJS.printJsLog("ATiOSBannerJS::loadNative(" + placementId + ", " + settings + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadNativeWithPlacementID:extra:", placementId, settings);
-    },
-
-    setAdListener : function (listener) {
-        ATiOSJS.printJsLog("ATiOSNativeJS::setAdListener(" + listener + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
-    },
-  
-    hasAdReady : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSNativeJS::hasAdReady(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "nativeReadyForPlacementID:", placementId);
-    },
-
-    showAd : function(placementId, adViewProperty) { 
-        ATiOSJS.printJsLog("ATiOSNativeJS::showAd(" + placementId + ", " + adViewProperty + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showNativeWithPlacementID:metrics:", placementId, adViewProperty);
-    },
-
-    removeAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSNativeJS::removeAd(" + placementId + ")");
-        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "removeNativeWithPlacementID:", placementId);
-    }
-};
-
-module.exports = ATiOSNativeJS;
+var ATiOSJS = require("ATiOSJS");
+const OC_WRAPPER_CLASS = "ATNativeAdWrapper";
+var ATiOSNativeJS = ATiOSNativeJS || {
+    loadNative : function(placementId, settings) {
+        ATiOSJS.printJsLog("ATiOSBannerJS::loadNative(" + placementId + ", " + settings + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadNativeWithPlacementID:extra:", placementId, settings);
+    },
+
+    setAdListener : function (listener) {
+        ATiOSJS.printJsLog("ATiOSNativeJS::setAdListener(" + listener + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
+    },
+  
+    hasAdReady : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSNativeJS::hasAdReady(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "nativeReadyForPlacementID:", placementId);
+    },
+
+    checkAdStatus : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSNativeJS::checkAdStatus(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "nativeCheckAdStatusForPlacementID:", placementId);
+    },
+
+    showAd : function(placementId, adViewProperty) { 
+        ATiOSJS.printJsLog("ATiOSNativeJS::showAd(" + placementId + ", " + adViewProperty + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showNativeWithPlacementID:scene:metrics:", placementId, null, adViewProperty);
+    },
+
+    showAdInScenario : function(placementId, adViewProperty, scenario) { 
+        ATiOSJS.printJsLog("ATiOSNativeJS::showAdInScenario(" + placementId + ", " + adViewProperty + ", " + scenario + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showNativeWithPlacementID:scene:metrics:", placementId, scenario, adViewProperty);
+    },
+
+    removeAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSNativeJS::removeAd(" + placementId + ")");
+        jsb.reflection.callStaticMethod(OC_WRAPPER_CLASS, "removeNativeWithPlacementID:", placementId);
+    }
+};
+
+module.exports = ATiOSNativeJS;

+ 41 - 36
assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSRewardedVideoJS.js

@@ -1,36 +1,41 @@
-var ATiOSJS = require("ATiOSJS");
-const OC_RV_WRAPPER_CLASS = "ATRewardedVideoWrapper";
-var ATiOSRewardedVideoJS = ATiOSRewardedVideoJS || {
-    loadRewardedVideo : function (placementId, extra) {
-        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::loadRewardedVideo(" + placementId + ", " + extra + ")");
-        jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "loadRewardedVideoWithPlacementID:extra:", placementId, extra);
-    },
-
-    setAdListener : function (listener) {
-        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::setAdListener(" + listener + ")");
-        jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "setDelegates:", listener);
-    },
-
-    hasAdReady : function (placementId) {
-        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::hasAdReady(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "rewardedVideoReadyForPlacementID:", placementId);
-    },
-
-    setUserData : function (placementId, userId, userData) {
-         cc.log("Android-setUserData");
-    },
-
-    showAd : function(placementId) {
-        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::showAd(" + placementId + ")");
-        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, null);
-        
-    },
-
-    showAdInScenario : function(placementId, scenario) {
-        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::showAdInScenario(" + placementId  + ", " + scenario + ")");
-        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, scenario);
-    } 
-  
-};
-
-module.exports = ATiOSRewardedVideoJS;
+var ATiOSJS = require("ATiOSJS");
+const OC_RV_WRAPPER_CLASS = "ATRewardedVideoWrapper";
+var ATiOSRewardedVideoJS = ATiOSRewardedVideoJS || {
+    loadRewardedVideo : function (placementId, extra) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::loadRewardedVideo(" + placementId + ", " + extra + ")");
+        jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "loadRewardedVideoWithPlacementID:extra:", placementId, extra);
+    },
+
+    setAdListener : function (listener) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::setAdListener(" + listener + ")");
+        jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "setDelegates:", listener);
+    },
+
+    hasAdReady : function (placementId) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::hasAdReady(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "rewardedVideoReadyForPlacementID:", placementId);
+    },
+
+    checkAdStatus : function (placementId) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::checkAdStatus(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "checkAdStatus:", placementId);
+    },
+
+    setUserData : function (placementId, userId, userData) {
+         cc.log("Android-setUserData");
+    },
+
+    showAd : function(placementId) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::showAd(" + placementId + ")");
+        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, null);
+        
+    },
+
+    showAdInScenario : function(placementId, scenario) {
+        ATiOSJS.printJsLog("ATiOSRewardedVideoJS::showAdInScenario(" + placementId  + ", " + scenario + ")");
+        return jsb.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, scenario);
+    } 
+  
+};
+
+module.exports = ATiOSRewardedVideoJS;