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