kleepklep Posted March 3, 2015 Share Posted March 3, 2015 I can't seem to find any examples of how to use Phaser.TweenManager removeFrom. The documentation at http://docs.phaser.io/Phaser.TweenManager.html says "Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated" so I assumed I could just use Phaser.TweenManager.removeFrom(targetGroup, true) but that doesn't work. The reason I need to do this is because I am removing a group with destroy() but its tween and associated onComplete listeners still exist and keep going and cause errors because the group no longer exists. Link to comment Share on other sites More sharing options...
kleepklep Posted March 3, 2015 Author Share Posted March 3, 2015 Looks like I was supposed to use game.tweens.removeFrom(targetGroup, true); Still doesn't seem to work, though. If anyone knows of a shortcut to destroy a group, all of it's children and any associated tweens and tween.onComplete listeners please let me know! Link to comment Share on other sites More sharing options...
Recommended Posts