chain(tweens) → {Phaser.Tween}
This method allows you to chain tweens together. Any tween chained to this tween will have its Tween.start
method called
as soon as this tween completes. If this tween never completes (i.e. repeatAll or loop is set) then the chain will never progress.
Note that Tween.onComplete
will fire when this tween completes, not when the whole chain completes.
For that you should listen to onComplete
on the final tween in your chain.
If you pass multiple tweens to this method they will be joined into a single long chain.
For example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C.
Any previously chained tweens that may have been set will be overwritten.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
tweens | Phaser.Tween | <repeatable> | One or more tweens that will be chained to this one. |
Returns
This tween. Useful for method chaining.
- Source code: tween/Tween.js (Line 566)
Please login to continue.