Ejemplo n.º 1
0
 public void quit()
 {
     //Wait for any autosave thread to finish (if exists) before continuing
     try
     {
         autosave.GetAutoSaveThread().Join();
     }
     catch (Exception) {}
     Saver.saveGame(player.EXP, player.CREDIT, player.ABILITY, player.getCurrentSpecial());
     Loader l = new Loader(global_vars.loadType.Main, ref variables, ref game);
     //Delete Timers
     specTimer.Dispose();
     shadowEaterStart.Dispose();
     spawnDelay.Dispose();
     autosave.delete();
     //Remove Objects from
     Collision_Detector.removeAll();
     game.Components.Clear();
     game.Components.Add(l);
 }
Ejemplo n.º 2
0
 public void quit()
 {
     Saver.saveGame(player.EXP, player.CREDIT, player.ABILITY, player.getCurrentSpecial());
     Loader l = new Loader(global_vars.loadType.Main, ref variables, ref game);
     game.Components.Clear();
     game.Components.Add(l);
 }
Ejemplo n.º 3
0
 public void exit()
 {
     Loader l = new Loader(global_vars.loadType.Main, ref variables, ref game);
     this.Dispose(true);
     game.Components.Add(l);
 }