crazyDev Posted February 5, 2016 Share Posted February 5, 2016 In the invaders game example, when an invader is killed, an explosion sprite takes its place. There are 30 invaders and 30 explosions in 2 groups. Is this the optimal way to do explosions, or will something like .setTexture() (haven't used it yet) do a better job? alien.kill(); var explosion = explosions.getFirstExists(false); explosion.reset(alien.body.x, alien.body.y); explosion.play('kaboom', 30, false, true); The alien sprite is killed and an explosion one replaces it, until the animation plays. Is this the best way to handle explosions for resource limited devices? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.