Пример #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();
        }
Пример #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();
        }