Jump to content

Combine several tweens into one


al_user
 Share

Recommended Posts

Hello everyone!

 

I have a problem, I have to add scale and move tweens to the sprite at the same time and I've done it as followed:

 

var tween1 = this.game.add.tween(this.sprite)    .to({ y: -50, }, 500, Phaser.Easing.Exponential.In)    .start();var tween2 = this.game.add.tween(this.sprite.scale)    .to({ x: 2, y: 2 }, 500, Phaser.Easing.Exponential.In)    .start();

Now I need to do some actions when all tweens are completed. Is it possible to combine several tweens into one? For example:

combinedTween.onComplete.add(this.done, this);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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