InputHandler#globalToLocalY()

globalToLocalY(y) Warning: EXPERIMENTAL Parameters Name Type Description y number Source code: input/InputHandler.js (Line 1542)

InputHandler#globalToLocalX()

globalToLocalX(x) Warning: EXPERIMENTAL Parameters Name Type Description x number Source code: input/InputHandler.js (Line 1524)

InputHandler#game

game : Phaser.Game A reference to the currently running game. Source code: input/InputHandler.js (Line 24)

InputHandler#enableSnap()

enableSnap(snapX, snapY, onDrag, onRelease, snapOffsetX, snapOffsetY) Make this Sprite snap to the given grid either during drag or when it's released.For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels. Parameters Name Type Argument Default Description snapX number The width of the grid cell to snap to. snapY number The height of the grid cell to snap to. onDrag boolean <optional> true If true the sprite will snap to the grid while b

InputHandler#enableDrag()

enableDrag(lockCenter, bringToTop, pixelPerfect, alphaThreshold, boundsRect, boundsSprite) Allow this Sprite to be dragged by any valid pointer. When the drag begins the Sprite.events.onDragStart event will be dispatched. When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched. You can control the thresholds over when a drag starts via the properties: Pointer.dragDistanceThreshold the distance, in pixe

InputHandler#enabled

enabled : boolean If enabled the Input Handler will process input requests and monitor pointer activity. Source code: input/InputHandler.js (Line 30)

InputHandler#dragTimeThreshold

dragTimeThreshold : integer The amount of time, in ms, the pointer has to be held down over the Sprite before it thinks it is being dragged. Source code: input/InputHandler.js (Line 202)

InputHandler#dragStopBlocksInputUp

dragStopBlocksInputUp : boolean If enabled, when the Sprite stops being dragged, it will only dispatch the onDragStop event, and not the onInputUp event. If set to false it will dispatch both events. Source code: input/InputHandler.js (Line 187)

InputHandler#dragStartPoint

dragStartPoint : Phaser.Point The Point from which the most recent drag started from. Useful if you need to return an object to its starting position. Source code: input/InputHandler.js (Line 192)

InputHandler#dragOffset

dragOffset : Phaser.Point The offset from the Sprites position that dragging takes place from. Source code: input/InputHandler.js (Line 177)