Jump to content

tween complete and remove that tween


sinanqd10
 Share

Recommended Posts

var tween;function create() {            var win = game.add.sprite(game.world.centerX,game.world.centerY,'win');            win.anchor.set(0.5);            tween = game.add.tween(win.scale.set(0));            tween.to({x:1,y:1},800, Phaser.Easing.Elastic.Out,true,1800);}

How can I remove the tween after it tween completed?

I have tried this method,but it seems not working.

tween.onComplete.add(function(){    tween.destroy();});
Link to comment
Share on other sites

Yes sorry for my mistake eguneys. Now I have solved it. However, can I ask you 1 more question about button reset and play the game again.

Here is the link for flash site http://www.happymeal.com.au/en_AU/index.html#/Home .

Click games menu and scroll find the Rock Paper Scissors game. Can you show me the tricks? :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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