Input#getPointerFromId()

getPointerFromId(pointerId) → {Phaser.Pointer}

Get the Pointer object whos pointerId property matches the given value.

The pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event.
Also it can change every time you press the pointer down if the browser recycles it.

Parameters
Name Type Description
pointerId number

The pointerId (not 'id') value to search for.

Returns

A Pointer object or null if no Pointer object matches the requested identifier.

Source code: input/Input.js (Line 876)
doc_phaser
2017-02-14 10:52:48
Comments
Leave a Comment

Please login to continue.