Exemplo n.º 1
0
        public override void Stop()
        {
            _logger.Log("Begin");

            _world.Dispose();

            _logger.Log("End");
        }
        public void Test_World_After_Destroy()
        {
            IWorld world = Root.CreateWorld();

            HandleUtils.ForceDestroy(world.Handle);

            // IWorld methods can't throw any exception after handle destroy
            Assert.IsNull(world.CreateActor());
            world.Clear();
            world.Dispose();

            Assert.IsNull(HandleUtils.TryGetReferenceHolder(world.Handle));
        }
Exemplo n.º 3
0
        public void Dispose()
        {
            _logger.Information("Disposing objects");
            _renderer.Dispose();
            _skybox.Dispose();
            _world.Dispose();
            _context.Dispose();
            _worldRenderer.Dispose();
            _ndcRenderer.Dispose();
            _skyboxRenderer.Dispose();
            _fullscreenShader.Dispose();
            _backbufferTexture.Dispose();

            _postprocessTexture.Dispose();
            _postprocessPipeline.Dispose();
        }
Exemplo n.º 4
0
        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
            if (_mobs != null)
            {
                foreach (IMob mob in _mobs)
                {
                    mob.Dispose();
                }
            }

            if (_world != null)
            {
                _world.Dispose();
            }

            if (_spriteBatch != null)
            {
                _spriteBatch.Dispose();
            }
        }
 public void LeaveWorld()
 {
     World.Dispose();
     World = null;
 }
Exemplo n.º 6
0
 public void Dispose()
 {
     world?.Dispose();
 }