update: 更新BannerAD Loaded 事件和回调
parent
2bbe1ccfd6
commit
fc53efbca3
|
|
@ -99,12 +99,16 @@ namespace Guru
|
||||||
InitConfig.AutoLoadWhenAdsReady, IsDebugMode);
|
InitConfig.AutoLoadWhenAdsReady, IsDebugMode);
|
||||||
|
|
||||||
//--------- Callbacks -----------
|
//--------- Callbacks -----------
|
||||||
|
ADService.OnBannerLoaded = OnBannerLoaded;
|
||||||
ADService.OnInterstitialLoaded = OnInterstitialLoaded;
|
ADService.OnInterstitialLoaded = OnInterstitialLoaded;
|
||||||
ADService.OnInterstitialFailed = OnInterstitialFailed;
|
ADService.OnInterstitialFailed = OnInterstitialFailed;
|
||||||
ADService.OnRewardLoaded = OnRewardLoaded;
|
ADService.OnRewardLoaded = OnRewardLoaded;
|
||||||
ADService.OnRewardFailed = OnRewardFailed;
|
ADService.OnRewardFailed = OnRewardFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void OnBannerLoaded()
|
||||||
|
=> Callbacks.Ads._onBannerADLoaded?.Invoke();
|
||||||
|
|
||||||
private static void OnInterstitialLoaded()
|
private static void OnInterstitialLoaded()
|
||||||
=> Callbacks.Ads._onInterstitialADLoaded?.Invoke();
|
=> Callbacks.Ads._onInterstitialADLoaded?.Invoke();
|
||||||
private static void OnInterstitialFailed()
|
private static void OnInterstitialFailed()
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,13 @@ namespace Guru
|
||||||
remove => _onAdsInitComplete -= value;
|
remove => _onAdsInitComplete -= value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static Action _onBannerADLoaded;
|
||||||
|
public static event Action OnBannerADLoaded
|
||||||
|
{
|
||||||
|
add => _onBannerADLoaded += value;
|
||||||
|
remove => _onBannerADLoaded -= value;
|
||||||
|
}
|
||||||
|
|
||||||
internal static Action _onInterstitialADLoaded;
|
internal static Action _onInterstitialADLoaded;
|
||||||
public static event Action OnInterstitialADLoaded
|
public static event Action OnInterstitialADLoaded
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue