Skip to content
ClassInput & Controls@public

FlxTouch

State of one browser touch pointer.

ts
export declare class FlxTouch extends FlxPoint

Constructors

ts
constructor(context: FlxContext, pointerId: number)

Constructs a new instance of the FlxTouch class

ParameterTypeDescription
contextFlxContext-
pointerIdnumber-

Properties

PropertyModifiersTypeDescription
age-number-
cancelled-boolean-
isPrimary-boolean-
justCancelledreadonlyboolean-
justPressedreadonlyboolean-
justReleasedreadonlyboolean-
pointerIdreadonlynumber-
pressedreadonlyboolean-
pressure-number-
startX-number-
startY-number-

Methods

getWorldPosition()

ts
getWorldPosition(camera?: FlxCamera, point?: FlxPoint): FlxPoint

Parameters:

ParameterTypeDescription
cameraFlxCamera-
pointFlxPoint-

Returns: FlxPoint

Released under the MIT License.