update: 添加IV广告和 RV 广告的关闭回调事件
							parent
							
								
									3be05511e4
								
							
						
					
					
						commit
						d89de67e44
					
				|  | @ -351,10 +351,12 @@ namespace Guru | |||
|             ADService.OnInterstitialStartLoad = OnInterstitialStartLoad; | ||||
|             ADService.OnInterstitialLoaded = OnInterstitialLoaded; | ||||
|             ADService.OnInterstitialFailed = OnInterstitialFailed; | ||||
|             ADService.OnInterstitialClosed = OnInterstitialClosed; | ||||
|             // RADS | ||||
|             ADService.OnRewardedStartLoad = OnRewardedStartLoad; | ||||
|             ADService.OnRewardLoaded = OnRewardedLoaded; | ||||
|             ADService.OnRewardFailed = OnRewardedFailed; | ||||
|             ADService.OnRewardedStartLoad = OnRewardStartLoad; | ||||
|             ADService.OnRewardLoaded = OnRewardLoaded; | ||||
|             ADService.OnRewardFailed = OnRewardFailed; | ||||
|             ADService.OnRewardClosed = OnRewardClosed; | ||||
|              | ||||
|             // ---------- Start Services ---------- | ||||
|             ADService.Instance.StartService(OnAdsInitComplete, spec); | ||||
|  | @ -383,12 +385,16 @@ namespace Guru | |||
|             => Callbacks.Ads._onInterstitialADLoaded?.Invoke(); | ||||
|         private static void OnInterstitialFailed() | ||||
|             => Callbacks.Ads._onInterstitialADFailed?.Invoke(); | ||||
|         private static void OnRewardedStartLoad(string adUnitId) | ||||
|         private static void OnInterstitialClosed() | ||||
|             => Callbacks.Ads._onInterstitialADClosed?.Invoke(); | ||||
|         private static void OnRewardStartLoad(string adUnitId) | ||||
|             => Callbacks.Ads._onRewardedADStartLoad?.Invoke(adUnitId);  | ||||
|         private static void OnRewardedLoaded() | ||||
|         private static void OnRewardLoaded() | ||||
|             => Callbacks.Ads._onRewardedADLoaded?.Invoke();  | ||||
|         private static void OnRewardedFailed() | ||||
|         private static void OnRewardFailed() | ||||
|             => Callbacks.Ads._onRewardADFailed?.Invoke(); | ||||
|         private static void OnRewardClosed() | ||||
|             => Callbacks.Ads._onRewardADClosed?.Invoke(); | ||||
| 
 | ||||
|         private static void OnAdsInitComplete() | ||||
|         { | ||||
|  |  | |||
|  | @ -73,6 +73,7 @@ namespace Guru | |||
|                     remove => _onAdsInitComplete -= value; | ||||
|                 } | ||||
|                  | ||||
|                 //------------ BANNER ----------------- | ||||
|                 internal static Action<string> _onBannerADStartLoad; | ||||
|                 public static event Action<string> OnBannerADStartLoad | ||||
|                 { | ||||
|  | @ -87,6 +88,7 @@ namespace Guru | |||
|                     remove => _onBannerADLoaded -= value; | ||||
|                 } | ||||
|                  | ||||
|                 //------------ INTER ----------------- | ||||
|                 internal static Action<string> _onInterstitialADStartLoad; | ||||
|                 public static event Action<string> OnInterstitialADStartLoad | ||||
|                 { | ||||
|  | @ -108,6 +110,14 @@ namespace Guru | |||
|                     remove => _onInterstitialADFailed -= value; | ||||
|                 } | ||||
|                  | ||||
|                 internal static Action _onInterstitialADClosed; | ||||
|                 public static event Action OnInterstitialADClosed | ||||
|                 { | ||||
|                     add => _onInterstitialADClosed += value; | ||||
|                     remove => _onInterstitialADClosed -= value; | ||||
|                 } | ||||
| 
 | ||||
|                 //------------ REWARD ----------------- | ||||
|                 internal static Action<string> _onRewardedADStartLoad; | ||||
|                 public static event Action<string> OnRewardedADStartLoad | ||||
|                 { | ||||
|  | @ -122,6 +132,13 @@ namespace Guru | |||
|                     remove => _onRewardedADLoaded -= value; | ||||
|                 } | ||||
|                  | ||||
|                 internal static Action _onRewardADClosed; | ||||
|                 public static event Action OnRewardedADClosed | ||||
|                 { | ||||
|                     add => _onRewardADClosed += value; | ||||
|                     remove => _onRewardADClosed -= value; | ||||
|                 } | ||||
| 
 | ||||
|                 internal static Action _onRewardADFailed; | ||||
|                 public static event Action OnRewardADFailed | ||||
|                 { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue