

namespace Guru
{
    using UnityEngine;
    
    public static partial class Analytics
    {
        /// <summary>
        /// B_Level 属性
        /// </summary>
        public static int BLevel
        {
            get => PlayerPrefs.GetInt(nameof(BLevel), 0);
            set => PlayerPrefs.SetInt(nameof(BLevel), value);
        }
        /// <summary>
        /// B_Play 属性
        /// </summary>
        public static int BPlay
        {
            get => PlayerPrefs.GetInt(nameof(BPlay), 0);
            set => PlayerPrefs.SetInt(nameof(BPlay), value);
        }
        /// <summary>
        /// 首次启动时间
        /// </summary>
        public static string FirstOpenTime
        {
            get
            {
                var stamp =  PlayerPrefs.GetString(nameof(FirstOpenTime), "");
                if (string.IsNullOrEmpty(stamp))
                {
                    stamp = TimeUtil.GetCurrentTimeStamp().ToString();
                    PlayerPrefs.SetString(nameof(FirstOpenTime), stamp);
                }
                return stamp;
            }
        }
    }
}