2023-12-26 03:40:48 +00:00
|
|
|
namespace Guru
|
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public partial class GuruSDK
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 回调参数类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Callbacks
|
|
|
|
|
{
|
2023-12-27 12:24:16 +00:00
|
|
|
/// <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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 03:40:48 +00:00
|
|
|
|
|
|
|
|
/// <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;
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-17 09:51:08 +00:00
|
|
|
internal static Action _onBannerADLoaded;
|
|
|
|
|
public static event Action OnBannerADLoaded
|
|
|
|
|
{
|
|
|
|
|
add => _onBannerADLoaded += value;
|
|
|
|
|
remove => _onBannerADLoaded -= value;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 03:40:48 +00:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-27 12:24:16 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// 云控参数
|
|
|
|
|
/// </summary>
|
2023-12-26 03:40:48 +00:00
|
|
|
public static class Remote
|
|
|
|
|
{
|
2023-12-27 12:24:16 +00:00
|
|
|
internal static Action<bool> _onRemoteFetchComplete;
|
|
|
|
|
public static event Action<bool> OnRemoteFetchComplete
|
|
|
|
|
{
|
|
|
|
|
add => _onRemoteFetchComplete += value;
|
|
|
|
|
remove => _onRemoteFetchComplete -= value;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-26 03:40:48 +00:00
|
|
|
|
2023-12-27 12:24:16 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// 支付回调
|
|
|
|
|
/// </summary>
|
2023-12-26 03:40:48 +00:00
|
|
|
public static class IAP
|
|
|
|
|
{
|
2024-03-18 02:22:11 +00:00
|
|
|
internal static Action _onIAPInitStart;
|
|
|
|
|
public static event Action OnIAPInitStart
|
|
|
|
|
{
|
|
|
|
|
add => _onIAPInitStart += value;
|
|
|
|
|
remove => _onIAPInitStart -= value;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 03:40:48 +00:00
|
|
|
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;
|
|
|
|
|
}
|
2023-12-28 11:29:04 +00:00
|
|
|
|
2024-03-18 02:22:11 +00:00
|
|
|
internal static Action<string, bool> _onPurchaseEnd;
|
|
|
|
|
public static event Action<string, bool> OnPurchaseEnd
|
|
|
|
|
{
|
|
|
|
|
add => _onPurchaseEnd += value;
|
|
|
|
|
remove => _onPurchaseEnd -= value;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-28 11:29:04 +00:00
|
|
|
internal static Action<string, string> _onPurchaseFailed;
|
|
|
|
|
public static event Action<string, string> OnPurchaseFailed
|
|
|
|
|
{
|
|
|
|
|
add => _onPurchaseFailed += value;
|
|
|
|
|
remove => _onPurchaseFailed -= value;
|
|
|
|
|
}
|
2024-01-23 05:57:09 +00:00
|
|
|
|
|
|
|
|
internal static Action<bool, string> _onIAPRestored;
|
|
|
|
|
public static event Action<bool, string> OnIAPRestored
|
|
|
|
|
{
|
|
|
|
|
add => _onIAPRestored += value;
|
|
|
|
|
remove => _onIAPRestored -= value;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 03:40:48 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-15 04:59:20 +00:00
|
|
|
|
|
|
|
|
public static class SDK
|
|
|
|
|
{
|
|
|
|
|
internal static Action<bool> _onFirebaseReady;
|
|
|
|
|
public static event Action<bool> OnFirebaseReady
|
|
|
|
|
{
|
|
|
|
|
add => _onFirebaseReady += value;
|
|
|
|
|
remove => _onFirebaseReady -= value;
|
|
|
|
|
}
|
2024-03-15 09:00:40 +00:00
|
|
|
|
|
|
|
|
internal static Action _onGuruServiceReady;
|
|
|
|
|
public static event Action OnGuruServiceReady
|
|
|
|
|
{
|
|
|
|
|
add => _onGuruServiceReady += value;
|
|
|
|
|
remove => _onGuruServiceReady -= value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 04:59:20 +00:00
|
|
|
}
|
|
|
|
|
|
2023-12-26 03:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|