Region():swipe()
Perform a single-finger swipe within the region.
Signature
swipe(swipePoints: List<SwipePoint>, params?: SwipeParams): void
Returns
void
Parameters
| Parameter | Type | Description |
|---|---|---|
| swipePoints | List<SwipePoint> | A list of points the finger moves through. Minimum 2 points. |
| params | SwipeParams | Optional. Controls swipe behavior such as continuous mode and delay. |
tip
This method works the same as Screen:swipe(). See that page for detailed parameter behavior, timeline examples, and SwipePoint defaults.
Example
local region = Region(0, 0, Screen:width(), Screen:height())
region:swipe({
SwipePoint(500, 1200, 50, 0),
SwipePoint(500, 400, 50, 1000),
})