public BoundsSystem(Context context, GameWindow window) { this.context = context; this.window = window; matcher = new ComponentMatcher(); matcher.All(typeof(VelocityComponent)); }
public MovementSystem(Context context) { this.context = context; matcher = new ComponentMatcher(); matcher.All(typeof(VelocityComponent), typeof(TransformComponent)); }
public ComponentBufferSparse(int bufferIndex, IMappedBuffer entitiesBuffer, int initialSize = 1 << 10) { buffer_ = new MappedBufferSparse <T>(entitiesBuffer, initialSize); EntFlags flag = 1u << bufferIndex; Matcher = new ComponentMatcher(flag); Sparse = true; }
public ComponentBufferDense(int bufferIndex, int initialSize = 1 << 10) { buffer_ = new MappedBufferDense <EntIdx, T>(); EntFlags flag = 1u << bufferIndex; Matcher = new ComponentMatcher(flag); Sparse = false; }
public CollisionSystem(Context context, int windowWidth, int windowHeight) { this.context = context; this.windowWidth = windowWidth; this.windowHeight = windowHeight; colliderMatcher = new ComponentMatcher(); colliderMatcher.All(typeof(ColliderComponent)); }
public RenderSystem(GraphicsDevice graphicsDevice, Context context) { this.graphicsDevice = graphicsDevice; this.context = context; spriteBatch = new SpriteBatch(graphicsDevice); matcher = new ComponentMatcher(); matcher.All(typeof(SpriteComponent)); }
public InputSystem(Context context) { this.context = context; matcher = new ComponentMatcher(); matcher.All(typeof(PlayerControllerComponent), typeof(VelocityComponent)); }