Ejemplo n.º 1
0
        public void SaveData(int index, Image background)
        {
            _saveData                   = new SaveData();
            _image.sprite               = background.sprite;
            _saveData.backgroundName    = background.name;
            _saveData.distractorHistory = GameDataManager.getInstance.DistractorToString();
            _saveData.readCount         = GameDataManager.getInstance.readCount;

            string path = string.Format("{0}/{1}.dat", Application.temporaryCachePath, GameDataManager.getInstance.savePath + index.ToString());

            FileIOExtension.SaveAsFile(_saveData, path, path);
        }
Ejemplo n.º 2
0
 public void Init()
 {
     for (int i = 0; i < 3; i++)
     {
         string   path = string.Format("{0}/{1}.dat", Application.temporaryCachePath, GameDataManager.getInstance.savePath + i.ToString());
         SaveData data = FileIOExtension.LoadFromFile <SaveData>(path, path);
         if (data != null)
         {
             _LoadBox[i].SetSaveData(data);
         }
     }
 }