添加支付回调
This commit is contained in:
parent
2f5914671c
commit
94fd22f534
|
@ -10,6 +10,9 @@ using Newtonsoft.Json;
|
||||||
using ThinkingAnalytics;
|
using ThinkingAnalytics;
|
||||||
using ThinkingData.Analytics;
|
using ThinkingData.Analytics;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
#if UNITY_PURCHASE
|
||||||
|
using UnityEngine.Purchasing;
|
||||||
|
#endif
|
||||||
using WZ;
|
using WZ;
|
||||||
|
|
||||||
public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
|
@ -31,6 +34,37 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
EFSdkManager.Instance.Init();
|
EFSdkManager.Instance.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UNITY_PURCHASE
|
||||||
|
#region 支付
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化回调
|
||||||
|
/// </summary>
|
||||||
|
public Action<bool, string> OnPurchaseInitComplete;
|
||||||
|
public void RegisterPurchaseInitHandler(Action<bool,string> _action)
|
||||||
|
{
|
||||||
|
OnPurchaseInitComplete = _action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取 AppStore/Google Play 上所有配置的商品;
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_action">返回所有商品信息</param>
|
||||||
|
/// ex:
|
||||||
|
/// Product[0].metadata.localizedTitle
|
||||||
|
/// Product[0].metadata.localizedPriceString
|
||||||
|
/// Product[0].metadata.localizedDescription
|
||||||
|
/// Product[0].metadata.isoCurrencyCode
|
||||||
|
public Action<Product[]> OnGetProductsInfo;
|
||||||
|
public void RegisterProductsInfoHandler(Action<Product[]> _action)
|
||||||
|
{
|
||||||
|
OnGetProductsInfo += _action;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
#endif
|
||||||
|
|
||||||
#region 买量用户回调
|
#region 买量用户回调
|
||||||
|
|
||||||
public Action<bool, string> OnUserSourceListener;
|
public Action<bool, string> OnUserSourceListener;
|
||||||
|
@ -47,6 +81,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 跳转谷歌评价
|
#region 跳转谷歌评价
|
||||||
public void Review()
|
public void Review()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue