kPlusPlus Posted April 2, 2017 Share Posted April 2, 2017 function moveBal(n) { if (n < baloni.children.length) { var balonX = gWidth * Math.round(); var balonY = gHeight * Math.round(); var timeFor = moveTime * Math.round(); game.add.tween(baloni.children[n]).to({ x: balonX, y: balonY }, timeFor, Phaser.Easing.Quadratic.InOut, true,5,-1,true); } } http://kplusplus-001-site1.atempurl.com/babalon.html I cant that ballons move non stop. Please help me. Link to comment Share on other sites More sharing options...
3ddy Posted April 3, 2017 Share Posted April 3, 2017 I don't understand your problem exactly, but -1 is responsible for infinite loop, change it to 0 if you don't want "move non stop". If you don't want the tween to go back to starting position (yoyo effect), change last true to false; Check documentation for list of parameters : http://phaser.io/docs/2.4.4/Phaser.Tween.html#to Link to comment Share on other sites More sharing options...
Recommended Posts