19 lines
461 B
C#
19 lines
461 B
C#
namespace Encompass
|
|
{
|
|
internal class ComponentEmitter<TComponent> : Engine where TComponent : struct, IComponent
|
|
{
|
|
public ComponentEmitter()
|
|
{
|
|
sendTypes.Add(typeof(TComponent));
|
|
}
|
|
|
|
public override void Update(double dt)
|
|
{
|
|
foreach (var (component, entity) in InternalRead<TComponent>())
|
|
{
|
|
AddExistingComponent(entity, component);
|
|
}
|
|
}
|
|
}
|
|
}
|