InputHandler#setDragLock()

setDragLock(allowHorizontal, allowVertical)

Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

Parameters
Name Type Argument Default Description
allowHorizontal boolean <optional>
true

To enable the sprite to be dragged horizontally set to true, otherwise false.

allowVertical boolean <optional>
true

To enable the sprite to be dragged vertically set to true, otherwise false.

Source code: input/InputHandler.js (Line 1597)
doc_phaser
2017-02-14 10:53:32
Comments
Leave a Comment

Please login to continue.