Or method
Q
Or([
- Q? other
Query-like Opens a new filter group (OR semantics between groups).
An entity passes the overall query if it passes any group. When other
is provided its groups are appended; without arguments a fresh empty group
is started and subsequent filter calls populate it:
query.With<Fire>().Or().With<Lava>()
// entities that have Fire OR have Lava
Implementation
Q Or([Q? other]) {
if (other != null) {
_groups.addAll(other._groups);
} else {
_groups.add(.new());
}
return self;
}