fix: 修正IAP判定标志位

feature/item_system
胡宇飞 2023-12-28 15:54:00 +08:00
parent dd4f95ab1d
commit a4bb381856
3 changed files with 6 additions and 6 deletions

View File

@ -16,8 +16,6 @@ namespace Guru
public string[] products;
//-------------------------------- 配置检测 --------------------------------
public bool IsIAPEnabled() => products != null && products.Length > 0;
public bool IsAmazonAndroidEnabled() => ad_settings != null &&
ad_settings.amazon_ids_android != null &&
ad_settings.amazon_ids_android.Length > 0;
@ -36,7 +34,9 @@ namespace Guru
public bool IsMolocoIOSEnabled() => ad_settings != null &&
ad_settings.moloco_ids_ios != null &&
ad_settings.moloco_ids_ios.Length > 0;
//-------------------------------- 配置检测 --------------------------------
public bool IsIAPEnabled() => app_settings != null && app_settings.enable_iap
&& products != null && products.Length > 0;
//-------------------------------- 配置检测 -------------------------------
}
[Serializable]
@ -56,7 +56,7 @@ namespace Guru
public bool enable_firebase = true;
public bool enable_facebook = true;
public bool enable_adjust = true;
public bool enable_iap = true;
public bool enable_iap = false;
}
[Serializable]

View File

@ -122,7 +122,7 @@ namespace Guru
private void OnFirebaseReady()
{
LogI($"--- Firebase complete ---");
if (InitConfig.IAPEnabled)
if (_appServicesConfig.IsIAPEnabled())
{
// LogI($"--- #2 Init IAP ---");
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP

View File

@ -28,7 +28,7 @@ namespace Guru
/// </summary>
public bool ShowDebugLog = false;
/// <summary>
/// 控参数的默认配置
/// 控参数的默认配置
/// </summary>
/// <returns></returns>
public Dictionary<string, object> DefaultRemoteData = new Dictionary<string, object>();