getComponentsFor method

List<Component> getComponentsFor(
  1. int entity
)

Returns all components of entity.

Implementation

List<Component> getComponentsFor(int entity) {
  final result = <Component>[];
  _forComponentsOfEntity(
    entity,
    (components, _) => result.add(components[entity]),
  );

  return result;
}