Beispiel #1
0
        protected override void UnloadData()
        {
            if (ShieldApiLoaded)
            {
                SApi.Unload();
            }

            if (WeaponCoreLoaded)
            {
                WeaponCore.Unload();
            }

            if (MESApi.MESApiReady)
            {
                MESApi.UnregisterListener();
            }

            if (WaterMod.Registered)
            {
                WaterMod.Unregister();
                WaterMod.OnRegisteredEvent -= WaterLogged;
                WaterMod.WaterCreatedEvent -= WaterHelper.WaterAdded;
                WaterMod.WaterRemovedEvent -= WaterHelper.WaterRemoved;
            }

            DebugTerminalControls.RegisterControls(false);

            Instance = null;

            SyncManager.Close();
            DamageHelper.UnregisterEntityWatchers();
            BehaviorManager.Behaviors.Clear();
            EntityWatcher.UnregisterWatcher();
        }
Beispiel #2
0
        protected override void UnloadData()
        {
            if (ShieldApiLoaded)
            {
                SApi.Unload();
            }

            if (WeaponCoreLoaded)
            {
                WeaponCore.Unload();
            }

            if (MESApi.MESApiReady)
            {
                MESApi.UnregisterListener();
            }

            Instance = null;

            SyncManager.Close();
            DamageHelper.UnregisterEntityWatchers();
            BehaviorManager.Behaviors.Clear();
            EntityWatcher.UnregisterWatcher();
        }
 private void Disconnect_Click(object sender, RoutedEventArgs e)
 {
     SyncManager.Close();
 }