Zintin1 Posted April 21, 2018 Share Posted April 21, 2018 Hello, On my project I have a function that repeat everysecond, in this function I create a star, which I animated with a tween, and make it disappear 1 second later. My problem is I can't target the star who just appear, all my stars disappear (obviously because they get all the same name "star"). So I should use game.add.tween(this) on the onComplete but it doesn't work. game.add.tween(star.scale).to({x: 1, y: 1}, 400, Phaser.Easing.Bounce.Out, true).onComplete.add(function() { game.add.tween(star).to({alpha: 0}, 400, Phaser.Easing.Linear.None, true, 1000); }); Thanks Link to comment Share on other sites More sharing options...
samme Posted April 21, 2018 Share Posted April 21, 2018 The current tween target is the first argument passed to Tween#onComplete. Link to comment Share on other sites More sharing options...
Recommended Posts