/// <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); }
//-------∽-★-∽------∽-★-∽--------∽-★-∽数据管理∽-★-∽--------∽-★-∽------∽-★-∽--------// /// <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); }
/// <summary> /// 创建当前用户偏好 /// </summary> /// <param name="usr_id_"></param> /// <returns></returns> public static SecurePref CreateUsrPref(string usr_id_) { m_usrPref = CreatePref(usr_id_); return(m_usrPref); }
//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); }