luschn Posted February 14, 2014 Share Posted February 14, 2014 I got a tiny problem with chained tweens, i hope anybody can help me:var tween = game.add.tween(mySprite).to({someoptions}, 1000, Phaser.Easing.Linear.None) .to({someoptions}, 1000, Phaser.Easing.Linear.None) .to({someoptions}, 1000, Phaser.Easing.Linear.None) .start();Now what i want to do is to completely stop the whole chain while it runs, and restart it from the beginning. I did this with the following code:game.tweens.removeAll();(game is the Phaser instance, of course) The tween gets stopped indeed and the sprite does not move anymore - but when i create a new tween chain right after "removeAll" it does not start immediately. Instead, the sprite stands still for a while (as if the other tween chain would still run in the background but with no visible effect) and the new tween chain runs smoothly after that time. I hope my explanation was understandable Link to comment Share on other sites More sharing options...
luschn Posted February 15, 2014 Author Share Posted February 15, 2014 Ok, i see nothing about this being fixed in the release list of 2.0 - so am i the only one having this issue, or is it even an issue? Did i do something wrong? Is there any other way to stop a tween chain and restart it immediately from the beginning? Link to comment Share on other sites More sharing options...
gabdab Posted March 17, 2014 Share Posted March 17, 2014 I think that pause let run the tween to the end before pausing . With resume you restart from the beginning . But anyway losing window focus a and getting back act strangely on pause .. check the pause example (phaser). Link to comment Share on other sites More sharing options...
luschn Posted March 19, 2014 Author Share Posted March 19, 2014 are you sure resume starts from the beginning? the pause example with resume does not, and resume usually means...well, resume, not restart Link to comment Share on other sites More sharing options...
Recommended Posts