119 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			119 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			C#
		
	
	
| namespace Guru
 | |
| {
 | |
|     using System;
 | |
|     using UnityEngine;
 | |
|     
 | |
|     
 | |
|     public partial class GuruSDK
 | |
|     {
 | |
| 
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 回调参数类
 | |
|         /// </summary>
 | |
|         public class Callbacks
 | |
|         {
 | |
|             
 | |
| 
 | |
|             /// <summary>
 | |
|             /// GDPR Consent
 | |
|             /// </summary>
 | |
|             public static class ConsentFlow
 | |
|             {
 | |
|                 /// <summary>
 | |
|                 /// 当Consent启动结束后返回状态码
 | |
|                 /// </summary>
 | |
|                 public static event Action<int> OnConsentResult
 | |
|                 {
 | |
|                     add => _onConsentResult += value;
 | |
|                     remove => _onConsentResult -= value;
 | |
|                 }
 | |
|                 internal static Action<int> _onConsentResult;
 | |
| 
 | |
|                 /// <summary>
 | |
|                 /// ATT 状态返回
 | |
|                 /// </summary>
 | |
|                 public static event Action<int> OnAttResult
 | |
|                 {
 | |
|                     add => _onAttResult += value;
 | |
|                     remove => _onAttResult -= value;
 | |
|                 }
 | |
|                 internal static Action<int> _onAttResult;
 | |
| 
 | |
|             }
 | |
| 
 | |
|             /// <summary>
 | |
|             /// 广告回调
 | |
|             /// </summary>
 | |
|             public static class Ads
 | |
|             {
 | |
|                 internal static Action _onAdsInitComplete;
 | |
|                 public static event Action OnAdsInitComplete
 | |
|                 {
 | |
|                     add => _onAdsInitComplete += value;
 | |
|                     remove => _onAdsInitComplete -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action _onInterstitialADLoaded;
 | |
|                 public static event Action OnInterstitialADLoaded
 | |
|                 {
 | |
|                     add => _onInterstitialADLoaded += value;
 | |
|                     remove => _onInterstitialADLoaded -= value;
 | |
|                 }
 | |
| 
 | |
|                 internal static Action _onInterstitialADFailed;
 | |
|                 public static event Action OnInterstitialADFailed
 | |
|                 {
 | |
|                     add => _onInterstitialADFailed += value;
 | |
|                     remove => _onInterstitialADFailed -= value;
 | |
|                 }
 | |
| 
 | |
|                 internal static Action _onRewardedADLoaded;
 | |
|                 public static event Action OnRewardedADLoaded
 | |
|                 {
 | |
|                     add => _onRewardedADLoaded += value;
 | |
|                     remove => _onRewardedADLoaded -= value;
 | |
|                 }
 | |
| 
 | |
|                 internal static Action _onRewardADFailed;
 | |
|                 public static event Action OnRewardADFailed
 | |
|                 {
 | |
|                     add => _onRewardADFailed += value;
 | |
|                     remove => _onRewardADFailed -= value;
 | |
|                 }
 | |
|             }
 | |
| 
 | |
| 
 | |
|             public static class Remote
 | |
|             {
 | |
|                 internal static Action _onRemoteInitComplete;
 | |
|                 public static event Action OnRemoteInitComplete;
 | |
|                 
 | |
|                 internal static Action _onRemoteFetchComplete;
 | |
|                 public static event Action OnRemoteFetchComplete;
 | |
|             }
 | |
| 
 | |
| 
 | |
|             public static class IAP
 | |
|             {
 | |
|                 internal static Action<bool> _onIAPInitComplete;
 | |
|                 public static event Action<bool> OnIAPInitComplete
 | |
|                 {
 | |
|                     add => _onIAPInitComplete += value;
 | |
|                     remove => _onIAPInitComplete -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<string> _onPurchaseStart;
 | |
|                 public static event Action<string> OnPurchaseStart
 | |
|                 {
 | |
|                     add => _onPurchaseStart += value;
 | |
|                     remove => _onPurchaseStart -= value;
 | |
|                 }
 | |
| 
 | |
|             }
 | |
| 
 | |
|         }
 | |
| 
 | |
| 
 | |
|     }
 | |
| } |