Wait
The Wait
action waits for a specified duration.
The options object for the Wait
action has the following properties:
duration
: The duration of the wait in milliseconds.runDuringTransition
: A boolean indicating whether the action should run during a transition. This is an optional property. If not specified, the default isfalse
.
The below example waits for 750 milliseconds when the button is clicked.
clickMeButton.onTapDown(() => {
circle.run(Action.wait({
duration: 750,
}));
console.log("Circle wait action has begun.");
});
note
As we see in this example, on its own, the Wait
action isn't very useful. Its power comes when you combine it with other Actions.
Loading...