Tween#yoyoDelay()

yoyoDelay(duration, index) → {Phaser.Tween}

Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled).
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 yoyoDelay.

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 yoyoDelay on all the children.

Returns

This tween. Useful for method chaining.

Source code: tween/Tween.js (Line 487)
doc_phaser
2017-02-14 11:18:45
Comments
Leave a Comment

Please login to continue.