Aller au contenu principal

Touch:down()

Performs a touch down action at the specified coordinates or point.

Signature

down(x: number, y: number): void
down(fingerId: number, x: number, y: number): void
down(fingerId: number, point: Point): void
down(point: Point): void

Parameters

ParameterTypeDescription
fingerIdnumberThe ID of the finger to use for the touch (optional)
xnumberThe x-coordinate of the touch point
ynumberThe y-coordinate of the touch point
pointPointA point object containing x and y coordinates

Returns

  • Type: void

Examples

Touch:init()

-- Simple touch down at coordinates
Touch:down(100, 200)

-- Touch down with finger ID
Touch:down(1, 100, 200)

-- Touch down using Point
local point = Point(100, 200)
Touch:down(point)

-- Touch down with finger ID using Point
Touch:down(1, point)