public void Run() { var engine = EngineFactory.CreateEngine(); engine.AddSimulator(new BasicSimulator(() => { lodRenderer.UpdateRendererState(); lodRenderer.RenderLines(); })); engine.AddSimulator(new WorldRenderingSimulator()); for (int x = 0; x < 200; x++) { for (int y = 0; y < 200; y++) { var i = level.CreateNewIsland(new Vector3(x * 100, 0, y * 100)); i.Mesh = TW.Assets.LoadMesh("Scattered\\TestIsland"); } } }
public void Simulate() { //renderIslandSpaceManagerBoxes(); lodRenderer.UpdateRendererState(); lodRenderer.RenderLines(); foreach (var a in getAllAddons().ToArray()) // This toarray is a temp bugfix due to the fact that prepareforrendering can create addons :s { a.PrepareForRendering(); } foreach (var p in level.TextPanelNodes) { p.UpdateForRendering(); p.TextRectangle.Update(); } hudService.Simulate(); renderDebugHud(); renderingSimulator.Simulate(); }