// Token: 0x06002891 RID: 10385 RVA: 0x0015373C File Offset: 0x0015193C
 public static void _saveFile(object o)
 {
     SaveState.saveLater = false;
     SaveState.SaveData saveData = (SaveState.SaveData)o;
     if (File.Exists("laststate.dat"))
     {
         File.Delete("laststate.dat");
     }
     using (Stream isolatedStorageFileStream = File.Create("laststate.dat"))
     {
         saveData.Serialize(isolatedStorageFileStream);
     }
 }
Ejemplo n.º 2
0
    public static void _saveFile(object o)
    {
        SaveState.saveLater = false;
        SaveState.SaveData saveData = (SaveState.SaveData)o;
        var path = Path.Combine(AppMain.storePath, "laststate.dat");

        if (File.Exists(path))
        {
            File.Delete(path);
        }
        using (var file = File.Create(path))
            saveData.Serialize((Stream)file);
    }
Ejemplo n.º 3
0
 public static void saveCurrentState(int mode)
 {
     if (AppMain.GsTrialIsTrial())
     {
         return;
     }
     SaveState.save.player_pos_x   = AppMain.g_gm_main_system.ply_work[0].obj_work.pos.x;
     SaveState.save.player_pos_y   = AppMain.g_gm_main_system.ply_work[0].obj_work.pos.y;
     SaveState.save.resume_pos_x   = AppMain.g_gm_main_system.resume_pos_x;
     SaveState.save.resume_pos_y   = AppMain.g_gm_main_system.resume_pos_y;
     SaveState.save.game_time      = AppMain.g_gm_main_system.game_time;
     SaveState.save.time_save      = AppMain.g_gm_main_system.time_save;
     SaveState.save.marker_pri     = AppMain.g_gm_main_system.marker_pri;
     SaveState.save.water_levell   = AppMain.g_gm_main_system.water_level;
     SaveState.save.pseudofall_dir = AppMain.g_gm_main_system.pseudofall_dir;
     SaveState.save.rest_num       = AppMain.g_gm_main_system.player_rest_num[0];
     SaveState.save.stage_id       = AppMain.g_gs_main_sys_info.stage_id;
     SaveState.save.level          = AppMain.g_gs_main_sys_info.level;
     SaveState.save.game_mode      = AppMain.g_gs_main_sys_info.game_mode;
     SaveState.save.boss_load_no   = AppMain.g_gm_main_system.boss_load_no;
     SaveState.save.player_flag    = AppMain.g_gm_main_system.ply_work[0].player_flag;
     SaveState.save.ring_num       = AppMain.g_gm_main_system.ply_work[0].ring_num;
     SaveState.save.ring_stage_num = AppMain.g_gm_main_system.ply_work[0].ring_stage_num;
     SaveState.save.score          = AppMain.g_gm_main_system.ply_work[0].score;
     if (mode == 1)
     {
         SaveState.save.gm_eve_data  = AppMain.gm_eve_data.saveData();
         SaveState.save.gm_ring_data = AppMain.gm_ring_data.saveData();
         SaveState.saveLater         = false;
     }
     else
     {
         SaveState.save.gm_eve_data  = (byte[])null;
         SaveState.save.gm_ring_data = (byte[])null;
         SaveState.saveLater         = false;
     }
     if (SaveState.saveLater)
     {
         return;
     }
     if (SaveState.saveThread != null)
     {
         SaveState.saveThread = (Thread)null;
     }
     SaveState.saveThread = new Thread(new ParameterizedThreadStart(SaveState._saveFile));
     SaveState.SaveData save = SaveState.save;
     SaveState.saveThread.Start((object)save);
 }
Ejemplo n.º 4
0
    public static void deleteSave()
    {
        if (AppMain.GsTrialIsTrial())
        {
            return;
        }
        SaveState.saveLater   = false;
        SaveState.beginResume = false;
        SaveState.save        = new SaveState.SaveData();
        var path = Path.Combine(AppMain.storePath, "laststate.dat");

        if (!File.Exists(path))
        {
            return;
        }
        File.Delete(path);
    }