241 lines
		
	
	
		
			8.4 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			241 lines
		
	
	
		
			8.4 KiB
		
	
	
	
		
			C#
		
	
	
| namespace Guru
 | |
| {
 | |
|     using System;
 | |
|     using UnityEngine;
 | |
|     
 | |
|     
 | |
|     public partial class GuruSDK
 | |
|     {
 | |
| 
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 回调参数类
 | |
|         /// </summary>
 | |
|         public class Callbacks
 | |
|         {
 | |
|             /// <summary>
 | |
|             /// APP 事件
 | |
|             /// </summary>
 | |
|             public static class App
 | |
|             {
 | |
|                 internal static Action<bool> _onAppPaused;
 | |
|                 public static event Action<bool> OnAppPaused
 | |
|                 {
 | |
|                     add => _onAppPaused += value;
 | |
|                     remove => _onAppPaused -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action _onAppQuit;
 | |
|                 public static event Action OnAppQuit
 | |
|                 {
 | |
|                     add => _onAppQuit += value;
 | |
|                     remove => _onAppQuit -= value;
 | |
|                 }
 | |
|             }
 | |
| 
 | |
| 
 | |
|             /// <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<string> _onBannerADStartLoad;
 | |
|                 public static event Action<string> OnBannerADStartLoad
 | |
|                 {
 | |
|                     add => _onBannerADStartLoad += value;
 | |
|                     remove => _onBannerADStartLoad -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action _onBannerADLoaded;
 | |
|                 public static event Action OnBannerADLoaded
 | |
|                 {
 | |
|                     add => _onBannerADLoaded += value;
 | |
|                     remove => _onBannerADLoaded -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<string> _onInterstitialADStartLoad;
 | |
|                 public static event Action<string> OnInterstitialADStartLoad
 | |
|                 {
 | |
|                     add => _onInterstitialADStartLoad += value;
 | |
|                     remove => _onInterstitialADStartLoad -= 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<string> _onRewardedADStartLoad;
 | |
|                 public static event Action<string> OnRewardedADStartLoad
 | |
|                 {
 | |
|                     add => _onRewardedADStartLoad += value;
 | |
|                     remove => _onRewardedADStartLoad -= 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;
 | |
|                 }
 | |
|             }
 | |
| 
 | |
|             /// <summary>
 | |
|             /// 云控参数
 | |
|             /// </summary>
 | |
|             public static class Remote
 | |
|             {
 | |
|                 internal static Action<bool> _onRemoteFetchComplete;
 | |
|                 public static event Action<bool> OnRemoteFetchComplete
 | |
|                 {
 | |
|                     add => _onRemoteFetchComplete += value;
 | |
|                     remove => _onRemoteFetchComplete -= value;
 | |
|                 }
 | |
|             }
 | |
| 
 | |
|             /// <summary>
 | |
|             /// 支付回调
 | |
|             /// </summary>
 | |
|             public static class IAP
 | |
|             {
 | |
|                 internal static Action _onIAPInitStart;
 | |
|                 public static event Action OnIAPInitStart
 | |
|                 {
 | |
|                     add => _onIAPInitStart += value;
 | |
|                     remove => _onIAPInitStart -= value;
 | |
|                 }
 | |
|                 
 | |
|                 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;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<string, bool> _onPurchaseEnd;
 | |
|                 public static event Action<string, bool> OnPurchaseEnd
 | |
|                 {
 | |
|                     add => _onPurchaseEnd += value;
 | |
|                     remove => _onPurchaseEnd -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<string, string> _onPurchaseFailed;
 | |
|                 public static event Action<string, string> OnPurchaseFailed
 | |
|                 {
 | |
|                     add => _onPurchaseFailed += value;
 | |
|                     remove => _onPurchaseFailed -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<bool, string> _onIAPRestored;
 | |
|                 public static event Action<bool, string> OnIAPRestored
 | |
|                 {
 | |
|                     add => _onIAPRestored += value;
 | |
|                     remove => _onIAPRestored -= value;
 | |
|                 }
 | |
|                 
 | |
| 
 | |
|             }
 | |
| 
 | |
| 
 | |
|             public static class SDK
 | |
|             {
 | |
|                 internal static Action<bool> _onFirebaseReady;
 | |
|                 public static event Action<bool> OnFirebaseReady
 | |
|                 {
 | |
|                     add => _onFirebaseReady += value;
 | |
|                     remove => _onFirebaseReady -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action _onGuruServiceReady;
 | |
|                 public static event Action OnGuruServiceReady
 | |
|                 {
 | |
|                     add => _onGuruServiceReady += value;
 | |
|                     remove => _onGuruServiceReady -= value;
 | |
|                 }
 | |
| 
 | |
|                 internal static Action<bool> _onDebuggerDisplayed;
 | |
|                 public static event Action<bool> OnDisplayDebugger
 | |
|                 {
 | |
|                     add => _onDebuggerDisplayed += value;
 | |
|                     remove => _onDebuggerDisplayed -= value;
 | |
|                 }
 | |
| 
 | |
|                 internal static Action<bool> _onUserAuthResult;
 | |
|                 public static event Action<bool> OnUserAuthResult
 | |
|                 {
 | |
|                     add => _onUserAuthResult += value;
 | |
|                     remove => _onUserAuthResult -= value;
 | |
|                 }
 | |
|                 
 | |
|                 internal static Action<bool> _onFirebaseAuthResult;
 | |
|                 public static event Action<bool> OnFirebaseAuthResult
 | |
|                 {
 | |
|                     add => _onFirebaseAuthResult += value;
 | |
|                     remove => _onFirebaseAuthResult -= value;
 | |
|                 }
 | |
|                 
 | |
|                 
 | |
|             }
 | |
| 
 | |
|         }
 | |
| 
 | |
| 
 | |
|     }
 | |
| } |