get method

bool get(
  1. Entity entity,
  2. Query2Callback<A, B> found
)

Implementation

bool get(Entity entity, Query2Callback<A, B> found) {
  if (!_world.isAlive(entity)) return false;
  final entityIndex = entity.index;
  final aDense = _a.denseIndexOf(entityIndex);
  if (aDense < 0) return false;
  final bDense = _b.denseIndexOf(entityIndex);
  if (bDense < 0) return false;
  if (!Query.passesFilters(entityIndex, _withStores, _withoutStores)) {
    return false;
  }
  found(entity, _a.valueAt(aDense), _b.valueAt(bDense));
  return true;
}