hitTestObject method

bool hitTestObject (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) {
  var otherBounds = other.getBounds(this);
  if (otherBounds == null) return false;

  return this.bounds.intersects(otherBounds);
}