public void OnLateDraw(GameTime gameTime) { _collisionManager.Draw(ActiveWorld.Player.Camera); _renderStatisticsOverlay.Draw(_spriteBatch); bool anyActive; lock (_uiElements) { anyActive = _uiElements.Count > 0 && _uiElements.Any(e => e.IsActive); } if (anyActive) { _spriteBatch.Begin(); lock (_uiElements) { _uiElements.ForEach(e => { if (e.IsActive) { e.Draw(gameTime); } }); } _spriteBatch.End(); } #if DEBUG_RENDERING _sceneRenderer.LateDebugDraw3D(); #endif }