containsPoint method

  1. @override
bool containsPoint(
  1. Vector2 point
)
override

Called to check whether the point is to be counted as within the component It needs to be overridden to have any effect, like it is in PositionComponent.

Implementation

@override
bool containsPoint(Vector2 point) {
  return hitboxes.any((hitbox) => hitbox.containsPoint(point));
}