LeeZolait Posted March 30, 2016 Share Posted March 30, 2016 Hello, I'm wondering how to running tween one by on, a sort of queue of tweens. I kown that i can use callBack or onComplete but i want to knon if there is a way already implemented in Phaser. Thx Link to comment Share on other sites More sharing options...
Luiz Bills Posted March 31, 2016 Share Posted March 31, 2016 http://phaser.io/examples/v2/tweens/chained-tweens VitaZheltyakov 1 Link to comment Share on other sites More sharing options...
megmut Posted March 31, 2016 Share Posted March 31, 2016 I haven't tested this as I'm not around a computer to test, but this should work also, it can be cleaner sometimes to look at, than chained tweens.. also works better for dynamically creating tweens. tween = game.add.tween(object); tween.to({x: 1000}, 2000, Phaser.Easing.Linear.None); tween.to({x: 2000}, 1500, Phaser.Easing.Linear.InOut); tween.to({x: 3000}, 1750, Phaser.Easing.Quadratic.InOut); tween.onComplete.add(function() { // callback complete anom function }, this); tween.start(); Link to comment Share on other sites More sharing options...
Recommended Posts