예제 #1
0
        private void Start()
        {
            SaveList saveList = GetSave();

            UpdateSave(saveList);
            SaveData(saveList);
        }
예제 #2
0
 private void UpdateSave(SaveList savescore)
 {
     foreach (Transform child in holder)
     {
         Destroy(child.gameObject);
     }
     foreach (SaveStruct s in savescore.SongSaveList)
     {
         Instantiate(SongBoject, holder).GetComponent <SaveInitalise>().Initalise(s);
     }
 }
예제 #3
0
        public static void SaveData(SaveList SaveData)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            FileStream      stream    = new FileStream(SavePath, FileMode.Create);

            formatter.Serialize(stream, SaveData);
            stream.Close();
            //using (StreamWriter stream = new StreamWriter(SavePath))
            //{
            //    new JsonSerializer().Serialize(stream, SaveData);
            //}
        }
예제 #4
0
        public static void StoreData(string songName, string imageName)
        {
            SaveList   saveList = SaveSystem.Save.GetSave();
            SaveStruct temp     = new SaveStruct();

            temp.songName  = songName;
            temp.imageName = imageName;
            temp.Line_1    = EditNode.Line_1;
            temp.Line_2    = EditNode.Line_2;
            temp.Line_3    = EditNode.Line_3;
            temp.Line_4    = EditNode.Line_4;
            temp.Line_5    = EditNode.Line_5;
            temp.Line_6    = EditNode.Line_6;
            temp.Line_7    = EditNode.Line_7;
            temp.Line_8    = EditNode.Line_8;
            temp.Line_9    = EditNode.Line_9;
            saveList.SongSaveList.Add(temp);
            SaveSystem.Save.SaveData(saveList);
        }