class FlxTouch
package flixel.input.touch
extends FlxPointer
implements IFlxInput, IFlxDestroyable
Available on all platforms
Helper class, contains and tracks touch points in your game. Automatically accounts for parallax scrolling, etc.
Variables
deltaViewX:Float
Distance in pixels this touch has moved in view space since the last frame in the X direction.
deltaViewY:Float
Distance in pixels this touch has moved in view space since the last frame in the Y direction.
read onlyjustPressedPosition:FlxPoint = FlxPoint.get()
The position of the touch when it was just pressed in FlxPoint.
read onlypressure:Float
A value between 0.0 and 1.0 indicating force of the contact with the device. If the device does not support detecting the pressure, the value is 1.0.
read onlytouchPointID:Int
The unique ID of this touch. You should not make not any further assumptions about this value - IDs are not guaranteed to start from 0 or ascend in order. The behavior may vary from device to device.
Methods
recycle(x:Int, y:Int, pointID:Int, pressure:Float):Void
Resets the justPressed/justReleased flags, sets touch to not pressed and sets touch pressure to 0.