Saltar al contenido principal

Touch:move()

Realiza una acción táctil de mover hacia las coordenadas o el punto especificados.

Firma

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

Parámetros

ParameterTypeDescription
fingerIdnumberEl ID del dedo a usar para el toque (opcional)
xnumberLa coordenada x del punto táctil
ynumberLa coordenada y del punto táctil
pointPointUn objeto punto que contiene las coordenadas x e y

Devuelve

  • Tipo: void

Ejemplos

Touch:init()

-- Simple touch move to coordinates
Touch:move(100, 200)

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

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

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