//ncrunch: no coverage start public void Dispose() { levelDebugRenderer.RemoveCommands(); if (is3D) { levelDebugRenderer.Dispose3D(); } else { levelDebugRenderer.Dispose2D(); } }
private void LoadLevel() { if (!ContentLoader.Exists(contentName, ContentType.Level)) { return; } DestroyEntitiesAndSetCommands(); Level = ContentLoader.Load <Level>(contentName); levelCommands.Level = Level; renderer.RemoveCommands(); Level.InitializeData(); renderer = new LevelDebugRenderer(Level); levelCommands.Renderer = renderer; levelObjectHandler.LevelSize = (int)(Level.Size.Width * Level.Size.Height); }