Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
cosmonaut | 52d4adf880 | |
cosmonaut | e5c1d7e4c4 | |
cosmonaut | 7b747aaec5 |
|
@ -17,11 +17,11 @@ namespace Encompass
|
|||
renderers.Add(renderer);
|
||||
}
|
||||
|
||||
public void Draw(double dt, double alpha)
|
||||
public void Draw()
|
||||
{
|
||||
foreach (var renderer in renderers)
|
||||
{
|
||||
renderer.Render(dt, alpha);
|
||||
renderer.Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Encompass
|
|||
_componentManager = componentManager;
|
||||
}
|
||||
|
||||
public abstract void Render(double dt, double alpha);
|
||||
public abstract void Render();
|
||||
|
||||
protected ReadOnlySpan<Entity> ReadEntities<TComponent>() where TComponent : struct
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Encompass
|
|||
}
|
||||
|
||||
// can't reflect invoke on Span returns...
|
||||
public override void Render(double dt, double alpha)
|
||||
public override void Render()
|
||||
{
|
||||
foreach (var type in _componentTypes)
|
||||
{
|
||||
|
|
|
@ -69,9 +69,9 @@ namespace Encompass
|
|||
/// <summary>
|
||||
/// Causes the Renderers to draw.
|
||||
/// </summary>
|
||||
public void Draw(double dt, double alpha)
|
||||
public void Draw()
|
||||
{
|
||||
_renderManager.Draw(dt, alpha);
|
||||
_renderManager.Draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -474,7 +474,7 @@ namespace Encompass
|
|||
dummyComponentManager.WriteComponents();
|
||||
|
||||
uberRenderer.SetEntity(uberEngine.Entity);
|
||||
uberRenderer.Render(1, 0);
|
||||
uberRenderer.Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Tests
|
|||
|
||||
class TestRenderer : Renderer
|
||||
{
|
||||
public override void Render(double dt, double alpha)
|
||||
public override void Render()
|
||||
{
|
||||
ref readonly var entity = ref ReadEntity<AComponent>();
|
||||
result = (GetComponent<AComponent>(entity), entity);
|
||||
|
@ -34,10 +34,10 @@ namespace Tests
|
|||
var world = worldBuilder.Build();
|
||||
|
||||
world.Update(0.01f);
|
||||
world.Draw(0.01f, 0);
|
||||
world.Draw();
|
||||
|
||||
world.Update(0.01);
|
||||
world.Draw(0.01f, 0);
|
||||
world.Draw();
|
||||
|
||||
Assert.That(result, Is.EqualTo((aComponent, entity)));
|
||||
}
|
||||
|
@ -59,10 +59,10 @@ namespace Tests
|
|||
var world = worldBuilder.Build();
|
||||
|
||||
world.Update(0.01f);
|
||||
world.Draw(0.01f, 0);
|
||||
world.Draw();
|
||||
|
||||
world.Update(0.01f);
|
||||
world.Draw(0.01f, 0);
|
||||
world.Draw();
|
||||
|
||||
Assert.That(result, Is.EqualTo((aComponent, entity)).Or.EqualTo((aComponentTwo, entityB)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue