public TechnologyInfo LoadSaveData(TechnologyInfoSaveData saveData) { TechnologyInfo info = new TechnologyInfo(saveData.technolgyID); info.currentState = saveData.currentState; info.researchProgress = saveData.progress; return(info); }
public static TechnologySaveData CreateSave() { TechnologySaveData data = new TechnologySaveData(); data.saveList = new List <TechnologyInfoSaveData>(); for (int i = 0; i < TechnologyDataManager.Instance.TechOnResearchList.Count; i++) { var info = TechnologyDataManager.Instance.TechOnResearchList[i]; TechnologyInfoSaveData saveItem = new TechnologyInfoSaveData(info.techID, info.currentState, info.researchProgress); data.saveList.Add(saveItem); } data.finishTechList = TechnologyDataManager.Instance.TechOnFinishIDList; return(data); }