repeatDelay(duration, index) → {Phaser.Tween}
Sets the delay in milliseconds before this tween will repeat itself.
The repeatDelay is invoked as soon as you call Tween.start
. If the tween is already running this method doesn't do anything for the current active tween.
If you have not yet called Tween.to
or Tween.from
at least once then this method will do nothing, as there are no tweens to set repeatDelay on.
If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
duration | number | The amount of time in ms that the Tween should wait until it repeats or yoyos once start is called. Set to zero to remove any active repeatDelay. | ||
index | number | <optional> | 0 | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeatDelay on all the children. |
Returns
This tween. Useful for method chaining.
- Source code: tween/Tween.js (Line 447)
Please login to continue.