Aller au contenu principal

Touch:move()

Effectue une action de déplacement tactile vers les coordonnées ou le point spécifié.

Signature

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

Paramètres

ParamètreTypeDescription
fingerIdnumberL'identifiant du doigt à utiliser pour le toucher (optionnel)
xnumberLa coordonnée x du point de toucher
ynumberLa coordonnée y du point de toucher
pointPointUn objet point contenant les coordonnées x et y

Renvoie

  • Type : void

Exemples

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)