diff --git a/Assets/Scripts/UI/PanelGame.cs b/Assets/Scripts/UI/PanelGame.cs index 81a32650..15555317 100644 --- a/Assets/Scripts/UI/PanelGame.cs +++ b/Assets/Scripts/UI/PanelGame.cs @@ -170,7 +170,7 @@ public class PanelGame : BasePanel PanelLevel tUILevel = UIManager.Instance.OpenUI(); tUILevel.Init(true); - TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.gaming_select); + //TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.gaming_select); } private void OnClickMenu() diff --git a/Assets/Scripts/UI/PanelResult.cs b/Assets/Scripts/UI/PanelResult.cs index e08c8732..c8b45464 100644 --- a/Assets/Scripts/UI/PanelResult.cs +++ b/Assets/Scripts/UI/PanelResult.cs @@ -140,6 +140,13 @@ public class PanelResult : BasePanel { mBtnEndings.ShowTip(!pIsWin && !pHasComplete); } + Debug.Log("Panel Result, levelId : " + pLevelID); + + if(pLevelID > 0) + { + Debug.Log("pLevelID > 0 才展示插屏"); + TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.resultpanel); + } } private void OnClickAgain() @@ -150,7 +157,7 @@ public class PanelResult : BasePanel if (!ReviewShowed) { - TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_retry); + //TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_retry); } } @@ -162,7 +169,7 @@ public class PanelResult : BasePanel if (!ReviewShowed) { - TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_next); + //TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_next); } } @@ -175,7 +182,7 @@ public class PanelResult : BasePanel if (!ReviewShowed) { - TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_select); + //TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_select); } } diff --git a/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs b/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs index 90ff1720..40d50bb6 100644 --- a/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs +++ b/Assets/TKGSDK/Config/Scripts/TKGAdPositionName.cs @@ -18,7 +18,8 @@ public enum TKGIVAdPositionName gaming_select, end_game_retry, end_game_next, - end_game_select + end_game_select, + resultpanel } public enum TKGNativePositionName diff --git a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceWebgl.cs b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceWebgl.cs index 5aea03cf..b7522895 100644 --- a/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceWebgl.cs +++ b/Assets/TKGSDK/NativeSDK/Scripts/SDK/TKGNativeInterfaceWebgl.cs @@ -116,11 +116,13 @@ namespace Touka private void initBanner() { #if H5_WX + return; + Debug.Log("tkg native webgl initBanner -----"); sysInfo = WX.GetSystemInfoSync(); bannerAd = WX.CreateBannerAd(new WXCreateBannerAdParam() { - adUnitId = "adunit-2e20328227ca771b", + adUnitId = "adunit-be92d71eb86ec60a", adIntervals = 30, style = new Style() { @@ -132,14 +134,15 @@ namespace Touka }); bannerAd.OnError((WXADErrorResponse res) => { - Debug.Log("bannerad error response"); + Debug.Log("bannerad error response, errCode : " + res.errCode + " , errMsg : " + res.errMsg); }); bannerAd.OnLoad((WXADLoadResponse res) => { - + Debug.Log("bannerad loaded response, rewardValue : " + res.rewardValue + " , shareValue : " + res.shareValue + " , errMsg : " + res.errMsg); }); bannerAd.OnResize((WXADResizeResponse res) => { + Debug.Log("bannerAd on resize, errMsg: " + res.errMsg + " , width : " + res.width + " , height : " + res.height); //拉取的广告可能跟设置的不一样,需要动态调整位置 bannerAd.style.top = (int)sysInfo.windowHeight - res.height; }); @@ -222,10 +225,16 @@ namespace Touka // _posIndex = 2; //} #if H5_WX + return; + if(bannerAd != null) { Debug.Log("tkg native webgl showBannerAd ----- 01"); - bannerAd.Show(); + bannerAd.Show((_succ)=> { + Debug.Log("banner ad show succ, errCode: " + _succ.errCode + " , errMsg : " + _succ.errMsg); + }, (_fail)=> { + Debug.Log("banner ad show fail, errCode: " + _fail.errCode + " , errMsg : " + _fail.errMsg); + }); } else {