18 lines
573 B
C#
18 lines
573 B
C#
using System;
|
|
|
|
namespace Encompass
|
|
{
|
|
/// <summary>
|
|
/// OrdereredRenderer provides a structure for the common pattern of wishing to draw a specific DrawComponent at a specific layer.
|
|
/// </summary>
|
|
public abstract class OrderedRenderer<TComponent> : Renderer where TComponent : struct, IComponent, IDrawableComponent
|
|
{
|
|
public abstract void Render(Entity entity, TComponent drawComponent);
|
|
|
|
internal void InternalRender(Entity entity, IComponent component)
|
|
{
|
|
Render(entity, (TComponent)component);
|
|
}
|
|
}
|
|
}
|