queryCount method

int queryCount(
  1. Iterable<Type> types
)

Implementation

int queryCount(Iterable<Type> types) {
  final ids = types.map((e) => _getOrCreateComponentID(e));
  final hash = SetHash(ids);
  int queryCount = 0;
  for (final kv in _archetypeIndex.entries) {
    if (kv.value.isEmpty) continue;
    if (kv.key.contains(hash)) {
      queryCount += kv.value.entityCount;
    }
  }
  return queryCount;
}