getObjectsAtLocation(x, y, group, callback, callbackContext, callbackArg) → {Array.<PIXI.DisplayObject>}
Given a Group and a location this will check to see which Group children overlap with the coordinates.
Each child will be sent to the given callback for further processing.
Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
x | number | The x coordinate to check. | |
y | number | The y coordinate to check. | |
group | Phaser.Group | The Group to check. | |
callback | function | <optional> | A callback function that is called if the object overlaps the coordinates. The callback will be sent two parameters: the callbackArg and the Object that overlapped the location. |
callbackContext | object | <optional> | The context in which to run the callback. |
callbackArg | object | <optional> | An argument to pass to the callback. |
Returns
An array of the Sprites from the Group that overlapped the coordinates.
- Source code: physics/arcade/World.js (Line 1622)
Please login to continue.