Ninjadoodle Posted March 22, 2018 Report Share Posted March 22, 2018 Hi @enpu When I remove a sprite created from a class ... enemy.sprite.remove(); ... any tweens/onComplete events continue triggering even tho the sprite is gone. Is this expected behaviour and do I need to remove the sprite / tweens in some other way? Link to comment Share on other sites More sharing options...
enpu Posted March 22, 2018 Report Share Posted March 22, 2018 @Ninjadoodle Yes that is expected, sprite.remove() just removes the sprite from it's parent, so it doesn't get rendered anymore. You should also stop all the tweens. Just call the stop function on all the tween instances, or use the game.Tween.stopTweensForObject Ninjadoodle 1 Link to comment Share on other sites More sharing options...
Ninjadoodle Posted March 22, 2018 Author Report Share Posted March 22, 2018 @enpu Thanks, that works , but now I'm having another issue - posted in new topic. Link to comment Share on other sites More sharing options...
Recommended Posts