Esempio n. 1
0
 public void LoadFromDisk(string username)
 {
     if (File.Exists(Application.persistentDataPath + "/" + (AppController.GetController().GetCurrentChallenge() + 1) + "levelComprehension.dat"))
     {
         BinaryFormatter bf   = new BinaryFormatter();
         FileStream      file = File.Open(Application.persistentDataPath + "/" + (AppController.GetController().GetCurrentChallenge() + 1) + "levelComprehension.dat", FileMode.Open);
         metricsModel = (MetricsModel)bf.Deserialize(file);
         file.Close();
     }
     else
     {
         metricsModel = new MetricsModel();
     }
     csvReadWriter.CreateNewCSV(AppController.GetController().GetCurrentChallenge());
     NewTest(username);
 }
Esempio n. 2
0
        public void LoadFromDisk()
        {
            if (File.Exists(Application.persistentDataPath + "/" + SettingsController.GetController().GetUsername() + ".dat"))
            {
                BinaryFormatter bf = new BinaryFormatter();
                FileStream file = File.Open(Application.persistentDataPath + "/" + SettingsController.GetController().GetUsername() + ".dat", FileMode.Open);
                metricsModel = (MetricsModel)bf.Deserialize(file);
                file.Close();

                metricsModel.UpdateGames(AppController.GetController().GetGames());
            } else
            {
                metricsModel = new MetricsModel(AppController.GetController().GetGames());
            }
        }
Esempio n. 3
0
 void Start()
 {
     metricsModel = new MetricsModel(AppController.GetController().GetGames());
     // list to first exercise is added
     actualBuffer = new List<List<bool>> {new List<bool>()};
 }