mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 09:34:02 +00:00
92d3a5efa8
The purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to interact with. It works by polling all of the valid game objects, and then slowly discounting those that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc). Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid for input and overlap with the Pointer. If you need fine-grained control over which of the items is selected then you can use this callback to do so. The callback will be sent 3 parameters: 1) A reference to the Phaser.Pointer object that is processing the Items. 2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites. 3) The current 'favorite' candidate, based on its priorityID and position in the display list. Your callback MUST return one of the candidates sent to it. |
||
---|---|---|
.. | ||
animation | ||
core | ||
gameobjects | ||
geom | ||
input | ||
loader | ||
math | ||
net | ||
particles | ||
physics | ||
pixi | ||
plugins/weapon | ||
sound | ||
stubs | ||
system | ||
tilemap | ||
time | ||
tween | ||
utils | ||
Intro.js | ||
Outro.js | ||
Phaser.js | ||
PixiDefaults.js | ||
polyfills.js |