Ejemplo n.º 1
0
 protected override void UnloadData()
 {
     base.UnloadData();
     MyAPIGateway.Entities.OnEntityAdd    -= on_entity_added;
     MyAPIGateway.Entities.OnEntityRemove -= on_entity_removed;
     sync_helper.deregister_handlers();
     screen_info.deregister_handlers();
     gravity_and_physics.dispose_all_PBs();
     foreach (IMyCubeGrid leftover_grid in _grids.Keys.ToList())
     {
         on_entity_removed(leftover_grid);
     }
     gravity_and_physics.deregister_all_sources();
     _sample_controller = null;
     _sample_thruster   = null;
     _sample_PB         = null;
     _setup_complete    = _entity_events_set = _ship_controller_controls_set = _thruster_controls_set = _programmable_block_properties_set = false;
     _session_ref       = null;
 }
Ejemplo n.º 2
0
 public session_handler()
 {
     _session_ref = this;
 }