/// <summary> /// Encodes the objects to be saved as a list of SaveDataItems. /// </summary public virtual void Encode(List <SaveDataItem> saveDataItems) { for (int i = 0; i < flowcharts.Count; i++) { var flowchart = flowcharts[i]; var flowchartData = FlowchartData.Encode(flowchart); var saveDataItem = SaveDataItem.Create(FlowchartDataKey, JsonUtility.ToJson(flowchartData)); saveDataItems.Add(saveDataItem); } }
/// <summary> /// Encodes the objects to be saved as a list of SaveDataItems. /// </summary public virtual void Encode(List <SaveDataItem> saveDataItems) { for (int i = 0; i < flowcharts.Count; i++) { var flowchart = flowcharts[i]; var flowchartData = FlowchartData.Encode(flowchart); var saveDataItem = SaveDataItem.Create(FlowchartDataKey, JsonUtility.ToJson(flowchartData)); saveDataItems.Add(saveDataItem); var narrativeLogItem = SaveDataItem.Create(NarrativeLogKey, FungusManager.Instance.NarrativeLog.GetJsonHistory()); saveDataItems.Add(narrativeLogItem); } }