explicitly require IDrawComponent interface on SetDrawComponent

pull/5/head
Evan Hemsley 2019-09-26 13:34:56 -07:00
parent 3e04e7ad03
commit 27c3fa1058
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ namespace Encompass
return SetComponent(GetEntityByComponentID<TComponent>(componentID), component);
}
protected Guid SetDrawComponent<TComponent>(Entity entity, TComponent component, int layer = 0) where TComponent : struct, IComponent
protected Guid SetDrawComponent<TComponent>(Entity entity, TComponent component, int layer = 0) where TComponent : struct, IComponent, IDrawComponent
{
var priority = writePriorities.ContainsKey(typeof(TComponent)) ? writePriorities[typeof(TComponent)] : 0;

View File

@ -55,7 +55,7 @@ namespace Encompass
return componentManager.MarkComponentForWrite(entity, component, priority);
}
public Guid SetDrawComponent<TComponent>(Entity entity, TComponent component, int priority = 0, int layer = 0) where TComponent : struct, IComponent
public Guid SetDrawComponent<TComponent>(Entity entity, TComponent component, int priority = 0, int layer = 0) where TComponent : struct, IComponent, IDrawComponent
{
return componentManager.MarkDrawComponentForWrite(entity, component, priority, layer);
}