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
Parameter | Type | Description |
---|---|---|
fingerId | number | The ID of the finger to use for the touch (optional) |
x | number | The x-coordinate of the touch point |
y | number | The y-coordinate of the touch point |
point | Point | A 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)