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 }); Task_localdata task_Localdatas = Find_Task(this.GetLocalKey(id)); task_Localdatas.val = value2; DataManager.Instance.Save_Player_Data(); //PlayerPrefs.SetString(this.GetLocalKey(id), value2); }
public Task_localdata Find_Task(string id) { Task_localdata task_Localdatas = DataManager.Instance.state_Player.task_Localdatas .Find(x => x._Id.Equals(id)); if (task_Localdatas == null) { task_Localdatas = new Task_localdata { _Id = id, val = "nil" }; DataManager.Instance.state_Player.task_Localdatas.Add(task_Localdatas); return(DataManager.Instance.state_Player.task_Localdatas .Find(x => x._Id.Equals(id))); } return(task_Localdatas); }