withComponent<T extends Component> method

Iterable<WorldEntity<Object>> withComponent<T extends Component>()

Returns the entities that have the specified component.

Implementation

Iterable<WorldEntity> withComponent<T extends Component>() {
  return _di.dependenciesWhereType<T>().map(
        (e) => e.metadata!.groupEntity as WorldEntity,
      );
}