Jump to content

How to use Phaser.TweenManager removeFrom


kleepklep
 Share

Recommended Posts

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...