public async void Update() { while (true) { if (!Paused) { generate.Update(); } await Task.Delay(TimeSpan.FromMilliseconds(timeStep / StepRate.Value)); } }
/// <summary> /// Render all elementes of this road. /// </summary> /// <param name="camera"></param> /// <param name="shadowTex"></param> public void Render(Camera camera) { if (Path.Moving) { return; } CheckRebuild(); if (Generator != null) { Generator.Update(); } foreach (Section section in Sections) { section.Render(camera); } FlushBatch(camera); foreach (Intersection isect in Intersections) { isect.Render(camera); } FlushBatch(camera); }
public void Update2() { IBatch Batch = Generator.Update(new TestClass[] { new TestClass(), new TestClass(), new TestClass() }); Assert.Equal(3, Batch.CommandCount); }
public void Update() { IBatch Batch = Generator.Update(new TestClass()); Assert.Equal(1, Batch.CommandCount); }
public void Update2() { var Batch = Generator.Update(new Dynamo[] { new Dynamo(), new Dynamo(), new Dynamo() }); Assert.Equal(0, Batch.CommandCount); }
public void Update() { IBatch Batch = Generator.Update(new Dynamo()); Assert.Equal(0, Batch.CommandCount); }