get method

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

Implementation

bool get(Entity entity, Query3Callback<A, B, C> 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;
  final cDense = _c.denseIndexOf(entityIndex);
  if (cDense < 0) return false;
  if (!Query.passesFilters(entityIndex, _withStores, _withoutStores)) {
    return false;
  }
  found(entity, _a.valueAt(aDense), _b.valueAt(bDense), _c.valueAt(cDense));
  return true;
}