From 27c3fa1058a0c058e0616e36d44200520b69d908 Mon Sep 17 00:00:00 2001 From: Evan Hemsley <2342303+ehemsley@users.noreply.github.com> Date: Thu, 26 Sep 2019 13:34:56 -0700 Subject: [PATCH] explicitly require IDrawComponent interface on SetDrawComponent --- encompass-cs/Engine.cs | 2 +- encompass-cs/WorldBuilder.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/encompass-cs/Engine.cs b/encompass-cs/Engine.cs index b3e69e7..cca223e 100644 --- a/encompass-cs/Engine.cs +++ b/encompass-cs/Engine.cs @@ -293,7 +293,7 @@ namespace Encompass return SetComponent(GetEntityByComponentID(componentID), component); } - protected Guid SetDrawComponent(Entity entity, TComponent component, int layer = 0) where TComponent : struct, IComponent + protected Guid SetDrawComponent(Entity entity, TComponent component, int layer = 0) where TComponent : struct, IComponent, IDrawComponent { var priority = writePriorities.ContainsKey(typeof(TComponent)) ? writePriorities[typeof(TComponent)] : 0; diff --git a/encompass-cs/WorldBuilder.cs b/encompass-cs/WorldBuilder.cs index e8176b7..be5d854 100644 --- a/encompass-cs/WorldBuilder.cs +++ b/encompass-cs/WorldBuilder.cs @@ -55,7 +55,7 @@ namespace Encompass return componentManager.MarkComponentForWrite(entity, component, priority); } - public Guid SetDrawComponent(Entity entity, TComponent component, int priority = 0, int layer = 0) where TComponent : struct, IComponent + public Guid SetDrawComponent(Entity entity, TComponent component, int priority = 0, int layer = 0) where TComponent : struct, IComponent, IDrawComponent { return componentManager.MarkDrawComponentForWrite(entity, component, priority, layer); }