public void DebugRender(IGameContext gameContext, IRenderContext renderContext) { if (gameContext.World == null) { return; } if (gameContext.World != _currentWorld || _shadowWorld == null) { if (_shadowWorld != null) { _shadowWorld.Dispose(); } _shadowWorld = _collisionFactory.CreateShadowWorld(); _currentWorld = gameContext.World; } using (_profiler.Measure("collision-debug-render")) { _shadowWorld.DebugRender(gameContext, renderContext); } }
public void Update(IServerContext serverContext, IUpdateContext updateContext) { if (serverContext.World == null) { return; } if (serverContext.World != _currentServerWorld || _shadowWorld == null) { if (_shadowWorld != null) { _shadowWorld.Dispose(); } _shadowWorld = _collisionFactory.CreateShadowWorld(); _currentServerWorld = serverContext.World; } using (_profiler.Measure("collision-step")) { _shadowWorld.Update(serverContext, updateContext); } }