コード例 #1
0
        protected override void OnDeactivate()
        {
            UpdateManager.Unsubscribe(LoopEntities);

            Config.EffectTypeItem.PropertyChanged -= ItemChanged;

            Config.RedItem.PropertyChanged   -= ItemChanged;
            Config.GreenItem.PropertyChanged -= ItemChanged;
            Config.BlueItem.PropertyChanged  -= ItemChanged;
            Config.AlphaItem.PropertyChanged -= ItemChanged;

            Config?.Dispose();
            ParticleManager.Dispose();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: MINERGUY67880/ClassicalSharp
        public override void Dispose()
        {
            MapRenderer.Dispose();
            MapBordersRenderer.Dispose();
            EnvRenderer.Dispose();
            WeatherRenderer.Dispose();
            SetNewScreen(null);
            fpsScreen.Dispose();
            SelectionManager.Dispose();
            TerrainAtlas.Dispose();
            TerrainAtlas1D.Dispose();
            ModelCache.Dispose();
            Picking.Dispose();
            ParticleManager.Dispose();
            Players.Dispose();
            AsyncDownloader.Dispose();
            AudioPlayer.Dispose();
            AxisLinesRenderer.Dispose();

            Chat.Dispose();
            if (activeScreen != null)
            {
                activeScreen.Dispose();
            }
            Graphics.DeleteIb(defaultIb);
            Graphics.Dispose();
            Drawer2D.DisposeInstance();
            Animations.Dispose();
            Graphics.DeleteTexture(ref CloudsTexId);
            Graphics.DeleteTexture(ref RainTexId);
            Graphics.DeleteTexture(ref SnowTexId);
            Graphics.DeleteTexture(ref GuiTexId);
            Graphics.DeleteTexture(ref GuiClassicTexId);

            if (Options.HasChanged)
            {
                Options.Save();
            }
            base.Dispose();
        }
コード例 #3
0
 public void Dispose(bool finalize)
 {
     forceManager.Dispose(finalize);
     particleManager.Dispose(finalize);
     broadPhase.Dispose(finalize);
 }