public static void saveFileTwo(monitorActivity MA) { BinaryFormatter formatter = new BinaryFormatter(); string savePath = Application.persistentDataPath + "/timeFILE.txt"; FileStream stream = new FileStream(savePath, FileMode.Create); timeFile timeData = new timeFile(MA); formatter.Serialize(stream, timeData); stream.Close(); }
public timeFile(monitorActivity MA) { totalTimeLearning_sav = monitorActivity.getTotalTimeOfLearning(); chaptersReadCount_sav = monitorActivity.getChaptersReadCount(); achievementsArray_sav = monitorActivity.getAchievementsArray(); }