delay(duration, index) → {Phaser.Tween}
Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts.
The delay 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 delay.
If you have child tweens and pass -1 as the index value it sets the delay 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 begins once started is called. Set to zero to remove any active delay. | ||
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 delay on all the children. |
Returns
This tween. Useful for method chaining.
- Source code: tween/Tween.js (Line 408)
Please login to continue.