private void SetLocalData(int type, int value, int id, int status) { string value2 = string.Format("{0},{1},{2},{3}", new object[] { type, value, id, status }); Achive_localdata achive_Localdatas = Find_Achive(this.GetLocalKey(type)); achive_Localdatas.val = value2; DataManager.Instance.Save_Player_Data(); //PlayerPrefs.SetString(this.GetLocalKey(type), value2); }
public Achive_localdata Find_Achive(string id) { Achive_localdata achive_Localdatas = DataManager.Instance.state_Player.achive_Localdatas .Find(x => x._Id.Equals(id)); if (achive_Localdatas == null) { achive_Localdatas = new Achive_localdata { _Id = id, val = "nil" }; DataManager.Instance.state_Player.achive_Localdatas.Add(achive_Localdatas); return(DataManager.Instance.state_Player.achive_Localdatas .Find(x => x._Id.Equals(id))); } return(achive_Localdatas); }