Ejemplo n.º 1
0
        public static GameSaveData CreateSave(int groupID, int saveIndex)
        {
            GameSaveData saveData = new GameSaveData();

            saveData.GroupID        = groupID;
            saveData.SaveIndex      = saveIndex;
            saveData.playerSaveData = PlayerSaveData.CreateSave();

            saveData.mainShipSaveData = MainShipSaveData.CreateSave();

            saveData.assembleSaveData   = AssembleSaveData.CreateSave();
            saveData.technologySaveData = TechnologySaveData.CreateSave();
            return(saveData);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void LoadTechSaveData(TechnologySaveData saveData)
        {
            InitAllTechInfo();
            TechOnResearchList.Clear();
            TechOnFinishIDList.Clear();
            // Load TechStates
            for (int i = 0; i < saveData.saveList.Count; i++)
            {
                TechnologyInfo info = new TechnologyInfo();
                info = info.LoadSaveData(saveData.saveList[i]);
                TechOnResearchList.Add(info);
            }

            TechOnFinishIDList = saveData.finishTechList;
        }