private void Window_Closing(object sender, CancelEventArgs e)
        {
            try
            {
                Game.Device.ClearState();
            }
            catch { }
            Rendering.Grid.Dispose();
            KeyboardInput.ReleaseDevice();
            MouseInput.ReleaseDevice();
            SpriteDrawer.Dispose();
            DeferredRenderer.Dispose();
            SkyDome.Dispose();
            TextureLoader.Dispose();
            PhysicsEngine.Dispose();
            GameData.Dispose();
            WorldData.Dispose();

            if (view1.D3DScene != null)
            {
                view1.D3DScene.Dispose();
            }
            view1.Dispose();

            ShaderHelper.Dispose();
        }
Ejemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            //GameWorld.Dispose(disposing);

            try
            {
                Game.Device.ClearState();
            }
            catch { }
            KeyboardInput.ReleaseDevice();
            MouseInput.ReleaseDevice();
            PrintText.Dispose();
            EffectManager.Dispose();
            SpriteDrawer.Dispose();
            DeferredRenderer.Dispose();
            SkyDome.Dispose();
            TextureLoader.Dispose();
            PhysicsEngine.Dispose();
        }