query<T extends Component> method

  1. @override
Iterable<T> query<T extends Component>({
  1. bool onlyVisible = false,
})
override

Used to find component by type visible or not.

Implementation

@override
Iterable<T> query<T extends Component>({bool onlyVisible = false}) {
  if (onlyVisible) {
    return _visibleComponents.whereType<T>();
  }
  return world.children.query<T>();
}