Jump to content

Does destroying a sprite also destroy it's tween?


Recommended Posts

Let's say I start a tween like this:

// create sprite
let mySprite:Phaser.Sprite = this.create(300, 50, "my_atlas", "bee");

// tween sprite
let yTween:Phaser.Tween = this.game.make.tween(mySprite);
yTween.to({y: 150}, 1500, Phaser.Easing.Linear.None, false, 0, 999, true);

Does calling "destroy" on the sprite also destroy it's tween? Or will the tween be silently running in the background until it runs 999 times?

// destroy sprite (will this also kill the tween and remove it from memory?)


Link to comment
Share on other sites


  • Recently Browsing   0 members

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