ecs
ecs copied to clipboard
Exclusion interface only matches if all components are present
I noticed the exclusion interface only excluded entities if all those components are present on an entity.
The behaviour I assumed was if one or all of the components on the exclude interface are on an entity it will exclude the entity.
Is the current behaviour the expected behaviour?
type NotMovementFace interface {
GetDropComponent() *components.DropComponent
GetTargetComponent() *components.TargetComponent
}
type NotMoveable interface {
ecs.BasicFace
NotMovementFace
}
// Will be excluded
type Enemy struct {
ecs.BasicEntity
SpaceComponent
VelocityComponent
TargetComponent
DropComponent
}
// Wil not be excluded
type Bullet struct {
ecs.BasicEntity
SpaceComponent
VelocityComponent
DropComponent
}
In the example above I would expect any entities with either drop. target or both get excluded?