From 14ba09b777c7a039ec8dab9ea053577d32ae57fd Mon Sep 17 00:00:00 2001 From: zhangjie0072 Date: Tue, 2 Aug 2022 13:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5sdk=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E3=80=81=E6=BF=80=E5=8A=B1=E8=A7=86=E9=A2=91=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Init/InitLogic.cs | 2 +- Assets/Scripts/UI/CustomControl/EndingCell.cs | 8 ++++---- .../UI/CustomControl/LevelPage/LevelPage.cs | 16 ++++++++-------- Assets/Scripts/UI/PanelResult.cs | 16 ++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Assets/Scripts/Init/InitLogic.cs b/Assets/Scripts/Init/InitLogic.cs index e3674a64..7989dc0d 100644 --- a/Assets/Scripts/Init/InitLogic.cs +++ b/Assets/Scripts/Init/InitLogic.cs @@ -9,7 +9,7 @@ public class InitLogic : MonoBehaviour { Application.targetFrameRate = 60; - //TKGSDKManager.Instance.InitSDK(EnterGame); + TKGSDKManager.Instance.InitSDK(EnterGame); EnterGame(); } diff --git a/Assets/Scripts/UI/CustomControl/EndingCell.cs b/Assets/Scripts/UI/CustomControl/EndingCell.cs index f6fc4f4d..091b1f26 100644 --- a/Assets/Scripts/UI/CustomControl/EndingCell.cs +++ b/Assets/Scripts/UI/CustomControl/EndingCell.cs @@ -93,10 +93,10 @@ public class EndingCell : MonoBehaviour private void OnClickAdTip() { - //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockSound, WatchAdSucceed, () => - //{ - // UIManager.Instance.OpenUI(); - //}); + TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_sound_unlock, WatchAdSucceed, () => + { + UIManager.Instance.OpenUI(); + }); WatchAdSucceed(true); } diff --git a/Assets/Scripts/UI/CustomControl/LevelPage/LevelPage.cs b/Assets/Scripts/UI/CustomControl/LevelPage/LevelPage.cs index cb11fef1..be66fbc8 100644 --- a/Assets/Scripts/UI/CustomControl/LevelPage/LevelPage.cs +++ b/Assets/Scripts/UI/CustomControl/LevelPage/LevelPage.cs @@ -90,14 +90,14 @@ public class LevelPage : PageView private void OnClickUnlockLevel(int pLevelIndex) { - //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockLevel, (pResult) => - //{ - // if (pResult) - // { - // PlayerData.Instance.UnlockNewLevel(false); - // LoadData(true); - // } - //}); + TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_level_unlock, (pResult) => + { + if (pResult) + { + PlayerData.Instance.UnlockNewLevel(false); + LoadData(true); + } + }); PlayerData.Instance.UnlockNewLevel(false); LoadData(true); diff --git a/Assets/Scripts/UI/PanelResult.cs b/Assets/Scripts/UI/PanelResult.cs index ed02fb51..767813c0 100644 --- a/Assets/Scripts/UI/PanelResult.cs +++ b/Assets/Scripts/UI/PanelResult.cs @@ -144,14 +144,14 @@ public class PanelResult : BasePanel private void OnClickSkip() { - //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.EndSkip, (pResult) => - //{ - // if (pResult) - // { - // PlayerData.Instance.UnlockNewLevel(); - // GameManager.Instance.NextLevel(); - // } - //}); + TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_end_skip, (pResult) => + { + if (pResult) + { + PlayerData.Instance.UnlockNewLevel(); + GameManager.Instance.NextLevel(); + } + }); PlayerData.Instance.UnlockNewLevel(); GameManager.Instance.NextLevel();