Example #1
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();

                /*Could be implemented to wipe data from deprecated games*/
//                metricsModel.UpdateGames(AppController.GetController().GetGames());
//            } else
//            {
//                metricsModel = new MetricsModel(AppController.GetController().GetGames());
//				AppController.GetController ().GetMetricsController ().SetMetricsModel (metricsModel);
            }
        }
Example #2
0
 public void SetMetricsModel(MetricsModel metricsModel)
 {
     this.metricsModel = metricsModel;
 }