mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 03:56:31 +00:00
implemented aspect filtering builder
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user