Static variables

staticflickThreshold:FlxPoint

The threshold distance that needs to be surpassed for a flick to be returned as true. Can be set globally.

staticmaxVelocity:FlxPoint

The max velocity the flicks are going to have. Can be set globally.

Variables

read onlyID:Int

Either LEFT_MOUSE, MIDDLE_MOUSE or RIGHT_MOUSE, or the touchPointID of a FlxTouch.

read onlydrag:FlxPoint

This isn't drag exactly, more like deceleration that is only applied when acceleration is not affecting the sprite.

flickDown:Bool

Whether a flick downwards has been passed or not.

flickLeft:Bool

Indicates when a flick leftwards has been passed or not.

flickRight:Bool

Indicates when a flick rightwards has been passed or not.

flickUp:Bool

Whether a flick upwards has been passed or not.

@:value(false)initialized:Bool = false

Whether the flick has been instanced or not.

read onlyvelocity:FlxPoint

The speed of flicks (in pixels per second), usually gotten from an input source.

Methods

destroy():Void

This is not a proper destroy function. It destroys the motion variables and sets intiliazed to false.

@:value({ ID : -1 })initFlick(ID:Int = -1, StartingVelocity:FlxPoint, ?Drag:FlxPoint):Void

Initialize the flick handling, usually triggered after a justReleased check. It initializes every important variable needed for calculation the motion of the flicks.

 * @param ID The TOUCH ID only for FlxTouch.
 * @param StartingVelocity The starting velocity of the input.
 * @param Drag How much drag for the velocity check, default is 700 pixels for both axes.

update(elapsed:Float):Void

Updates the flick management.

Parameters:

elapsed

Time elapsed.