This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.
You should generally use the
overlap method instead, with a Sprite vs. a Tilemap Layer, as that will perform
tile filtering and culling for you, as well as handle the interesting face collision automatically.
This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method, you should filter them before passing them to this method.
The first object to check for collision.
An array of Tiles to check for collision against.
An optional callback function that is called if the objects overlap.
An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then
The context in which to run the callbacks.
True if any objects overlap (with
overlapOnly); or true if any overlapping objects were separated.