encompass-cs/encompass-cs/RenderManager.cs

29 lines
659 B
C#

using System.Collections.Generic;
namespace Encompass
{
internal class RenderManager
{
private readonly EntityManager _entityManager;
private readonly List<Renderer> renderers = new List<Renderer>();
public RenderManager(EntityManager entityManager)
{
_entityManager = entityManager;
}
public void AddRenderer(Renderer renderer)
{
renderers.Add(renderer);
}
public void Draw(double dt, double alpha)
{
foreach (var renderer in renderers)
{
renderer.Render(dt, alpha);
}
}
}
}