Class: Overlap

new Overlap()

Methods

overlap(displayObject)

Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a getBounds method and result.

This check ignores the hitArea property if set and runs a getBounds comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.
It should be fine for low-volume testing where physics isn't required.