98 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			98 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
namespace Guru
 | 
						|
{
 | 
						|
    public partial class GuruSDK
 | 
						|
    {
 | 
						|
        
 | 
						|
        public static string UID => _model?.UserId ?? IPMConfig.IPM_UID;
 | 
						|
        public static string UUID => _model?.UserId ?? IPMConfig.IPM_UUID;
 | 
						|
        public static string DeviceId => IPMConfig.IPM_DEVICE_ID ?? "";  // TODO: change it to _model member later.
 | 
						|
        public static string PushToken => IPMConfig.IPM_PUSH_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
						|
        public static string AuthToken => IPMConfig.IPM_TOKEN ?? ""; // TODO: change it to _model member later.
 | 
						|
        public static string SupportEmail => GuruSettings.SupportEmail ?? "";
 | 
						|
 | 
						|
        public static string StoreUrl
 | 
						|
        {
 | 
						|
            get
 | 
						|
            {
 | 
						|
                string url = "";
 | 
						|
#if UNITY_EDITOR
 | 
						|
                url = "https://test@com.guru.ai";
 | 
						|
#elif UNITY_ANDROID
 | 
						|
                url = GuruSettings?.AndroidStoreUrl ?? "";
 | 
						|
#elif UNITY_IOS
 | 
						|
                url = GuruSettings?.IOSStoreUrl ?? "";
 | 
						|
#endif
 | 
						|
                return url;
 | 
						|
            }
 | 
						|
        }
 | 
						|
        
 | 
						|
        public static string PrivacyUrl => GuruSettings.PriacyUrl ?? "";
 | 
						|
        
 | 
						|
        public static string TermsUrl => GuruSettings.TermsUrl ?? "";
 | 
						|
 | 
						|
        public static string AppVersion => GuruAppVersion.version;
 | 
						|
 | 
						|
        public static string AppVersionCode => GuruAppVersion.code;
 | 
						|
        
 | 
						|
        public static string AppVersionString => GuruAppVersion.ToString();
 | 
						|
 | 
						|
        public static bool IsNewUser => IPMConfig.IPM_NEWUSER;
 | 
						|
        
 | 
						|
        public static string FireabseId => IPMConfig.FIREBASE_ID;
 | 
						|
        public static string IDFA => IPMConfig.ADJUST_IDFA;
 | 
						|
        public static string AdjustId => IPMConfig.ADJUST_ID;
 | 
						|
        public static string GSADID => IPMConfig.ADJUST_ADID;
 | 
						|
        public static string CdnHost => _appServicesConfig?.CdnHost() ?? "";
 | 
						|
 | 
						|
        private static GuruAppVersion _appVersion;
 | 
						|
        private static GuruAppVersion GuruAppVersion
 | 
						|
        {
 | 
						|
            get
 | 
						|
            {
 | 
						|
                if(_appVersion == null) _appVersion = GuruAppVersion.Load();
 | 
						|
                return _appVersion;
 | 
						|
            }
 | 
						|
        }
 | 
						|
 | 
						|
 | 
						|
        private static string _appBundleId;
 | 
						|
        public static string AppBundleId => _appBundleId;
 | 
						|
 | 
						|
        
 | 
						|
        /// <summary>
 | 
						|
        /// 设置购买去广告道具的标志位
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="value"></param>
 | 
						|
        public static void SetBuyNoAds(bool value = true)
 | 
						|
        {
 | 
						|
            Model.IsNoAds = value;
 | 
						|
            ADService.Instance.IsBuyNoAds = value;
 | 
						|
            SetUserProperty(Consts.PropertyNoAds, value? "true" : "false");
 | 
						|
            if(value) SetUserIsIAP(true);
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// 所有成功的主线关卡数量 (b_level)
 | 
						|
        /// </summary>
 | 
						|
        public static int SuccessLevelCount
 | 
						|
        {
 | 
						|
            get => GuruSDKModel.Instance.SuccessLevelId;
 | 
						|
            set => GuruSDKModel.Instance.SuccessLevelId = value;
 | 
						|
        }
 | 
						|
        
 | 
						|
        /// <summary>
 | 
						|
        /// 成功关卡总计数量 (b_play)
 | 
						|
        /// </summary>
 | 
						|
        public static int TotalPlayedCount
 | 
						|
        {
 | 
						|
            get => GuruSDKModel.Instance.TotalPlayedCount;
 | 
						|
            set => GuruSDKModel.Instance.TotalPlayedCount = value;
 | 
						|
        }
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    
 | 
						|
 | 
						|
} |