Input#getPointerFromIdentifier()

getPointerFromIdentifier(identifier) → {Phaser.Pointer}

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

The identifier 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, and is not fixed once set.
Note: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead.

Parameters
Name Type Description
identifier number

The Pointer.identifier value to search for.

Returns

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

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

Please login to continue.