hitTestObject method

bool hitTestObject(
  1. DisplayObject other
)

Evaluates this display object to see if it overlaps or intersects with the bounding box of the other display object.

Implementation

bool hitTestObject(DisplayObject other) {
  final otherBounds = other.getBounds(this);
  return bounds.intersects(otherBounds);
}