From a748fc8166061c4117beb04f237cf775ecdb3958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=89=E5=B3=B0?= Date: Mon, 1 Sep 2025 23:21:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=92=E5=8A=A8=E5=B9=BF=E5=91=8A=E6=94=B6?= =?UTF-8?q?=E7=9B=8A=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/SDKManager/AppSDKManager.cs | 34 +++++++++---------- .../SDKManager/EFSdkManager/EFSdkManager.cs | 22 ++++++++++++ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/Assets/Script/SDKManager/AppSDKManager.cs b/Assets/Script/SDKManager/AppSDKManager.cs index a26bf32..39bcc4c 100644 --- a/Assets/Script/SDKManager/AppSDKManager.cs +++ b/Assets/Script/SDKManager/AppSDKManager.cs @@ -36,6 +36,21 @@ public class AppSDKManager : D_MonoSingleton #region ad + public void ShowRewardAd(string position, Action callback = null) + { + bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady(); + if (isRewardAdReady) + { + AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) => + { + if (isReward) + { + //callback?.Invoke(); + callback?.Invoke(true, revenue); + } + }); + } + } public void ShowInterstitial(string position, IvType ivadType = IvType.IV1, Action callback = null) { //插屏展示逻辑 @@ -112,24 +127,7 @@ public class AppSDKManager : D_MonoSingleton } #endregion - - - public void ShowRewardAd(string position, Action callback = null) - { - bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady(); - if (isRewardAdReady) - { - AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) => - { - if (isReward) - { - //callback?.Invoke(); - callback?.Invoke(true, revenue); - } - }); - } - } #region 在线参数 @@ -151,7 +149,7 @@ public class AppSDKManager : D_MonoSingleton return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue); } - public string GetRemoteConfigString(string key, string defaultValue = "") + public string GetRemoteConfigStr(string key, string defaultValue = "") { if (Application.isEditor) { diff --git a/Assets/Script/SDKManager/EFSdkManager/EFSdkManager.cs b/Assets/Script/SDKManager/EFSdkManager/EFSdkManager.cs index 03bcf93..d88ff2d 100644 --- a/Assets/Script/SDKManager/EFSdkManager/EFSdkManager.cs +++ b/Assets/Script/SDKManager/EFSdkManager/EFSdkManager.cs @@ -34,6 +34,7 @@ namespace WZ }); SetSDKEventCallback(); + SetHdH5ImpressionCallback(); } private void SetSDKEventCallback() @@ -44,5 +45,26 @@ namespace WZ ShuShuEvent.Instance.Track(eventName, dict); }); } + + // + /// 互动广告展示回调,此时可以计算上报互动广告展示次数和收益 + /// + /// string 是互动广告的url + public void SetHdH5ImpressionCallback() + { + EFSdk.get().SetHdH5ImpressionCallback((url) => + { + //TODO 判断是okspin还是appluck + string h5ad_okspinrev = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_okspinrev", "0"); + string h5ad_appluckrev= FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_appluckrev", "0"); + //TODO 上报 + //adjust + //AdjustTrackEvent.Instance.TrackAdEvent(); + //firebase + //FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(); + //数数 + //ShuShuEvent.Instance.OnAdRevenueEvent(); + }); + } } } \ No newline at end of file