queryRaw method
Implementation
Iterable<List<Component>> queryRaw(Iterable<Type> types) {
final ids = types.map((e) => _getOrCreateComponentID(e));
final hash = SetHash(ids);
final queryRows = <List<Component>>[];
for (final kv in _archetypeIndex.entries) {
if (kv.value.isEmpty) continue;
if (kv.key.contains(hash)) {
for (int i = 0; i < kv.value.entityCount; i++) {
final componentsOfEntity = <Component>[];
for (final componentID in ids) {
componentsOfEntity
.add(kv.value.components[_componentIndex[componentID]![kv.value.setHash]!][i]);
}
queryRows.add(componentsOfEntity);
}
}
}
return queryRows;
}