implemented aspect filtering builder

This commit is contained in:
Dylan Wilson
2018-06-10 23:49:35 +10:00
parent 30f852253f
commit a9ec00a21f
16 changed files with 397 additions and 30 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ namespace Sandbox
private ComponentMapper<Transform2> _transformMapper;
public MyRenderSystem(GraphicsDevice graphicsDevice)
: base(Aspect.All(typeof(Transform2)))
{
_spriteBatch = new SpriteBatch(graphicsDevice);
}
@@ -26,7 +27,7 @@ namespace Sandbox
{
_spriteBatch.Begin(samplerState: SamplerState.PointClamp);
foreach (var entity in World.EntityManager.Entities)
foreach (var entity in GetEntities())
{
var transform = _transformMapper.GetComponent(entity);