Mark Posted April 8, 2014 Share Posted April 8, 2014 Looking at the Phaser Invaders example: http://examples.phaser.io/_site/view_full.html?d=games&f=invaders.js&t=invaders Replicated the code - and as per the example the tween.onComplete.Add doesn't seem to fire for the YoYo event. Any ideas? Link to comment Share on other sites More sharing options...
Mark Posted April 8, 2014 Author Share Posted April 8, 2014 An update to this problem, the code is errornous - the onComplete event should be replaced with onLoop - and then it functions as desired. gikdew 1 Link to comment Share on other sites More sharing options...
rich Posted April 8, 2014 Share Posted April 8, 2014 It can never complete if yoyo is true (unless you disable yoyo during tweening I guess). I'll update the docs to reflect this (and modify invaders, I believe it used to just recreate the tween on descend, but onLoop will work just as well you're right). Link to comment Share on other sites More sharing options...
Recommended Posts