Beispiel #1
0
        /// <summary>
        /// 获取偏好
        /// </summary>
        /// <param name="id_"></param>
        /// <returns></returns>
        public static SecurePref GetPref(string id_)
        {
            SecurePref pref = null;

            if (m_id2pref.ContainsKey(id_))
            {
                pref = m_id2pref[id_];
            }
            return(pref);
        }
Beispiel #2
0
        //-------∽-★-∽------∽-★-∽--------∽-★-∽数据管理∽-★-∽--------∽-★-∽------∽-★-∽--------//

        /// <summary>
        /// 创建一个偏好
        /// </summary>
        /// <param name="id_"></param>
        /// <returns></returns>
        public static SecurePref CreatePref(string id_)
        {
            SecurePref pref = null;

            if (m_id2pref.ContainsKey(id_))
            {
                pref = m_id2pref[id_];
                return(pref);
            }

            pref        = new SecurePref();
            pref.PrefID = id_;

            m_id2pref[id_] = pref;
            return(pref);
        }
Beispiel #3
0
 /// <summary>
 /// 创建当前用户偏好
 /// </summary>
 /// <param name="usr_id_"></param>
 /// <returns></returns>
 public static SecurePref CreateUsrPref(string usr_id_)
 {
     m_usrPref = CreatePref(usr_id_);
     return(m_usrPref);
 }
Beispiel #4
0
        //public static void DeleteKey(string key_)
        //{
        //    PlayerPrefs.DeleteKey(key_);
        //}

        /// <summary>
        /// 创建全局偏好
        /// </summary>
        /// <returns></returns>
        public static SecurePref CreateGlPref()
        {
            m_glPref = CreatePref(PREF_ID_GLOBAL);
            return(m_glPref);
        }