components method

(A, B, C)? components(
  1. Entity entity
)

Implementation

(A, B, C)? components(Entity entity) {
  if (!_world.isAlive(entity)) return null;
  final entityIndex = entity.index;
  final aDense = _a.denseIndexOf(entityIndex);
  if (aDense < 0) return null;
  final bDense = _b.denseIndexOf(entityIndex);
  if (bDense < 0) return null;
  final cDense = _c.denseIndexOf(entityIndex);
  if (cDense < 0) return null;
  if (!Query.passesFilters(entityIndex, _withStores, _withoutStores)) {
    return null;
  }
  return (_a.valueAt(aDense), _b.valueAt(bDense), _c.valueAt(cDense));
}