Time for action – go boom
I must say, there's a distinct missing element to our bomb-centric game to this point. What could it be, what could it be? Ah, yes. ASSPLOSIONS. When they hit the ground OR the player, those bombs need to blow up real good. Sounds like a particle system would do just the trick.
Make sure you're no longer testing the game.
Navigate to GameObject | Create Other | Particle System. Rename it
Explosion
(orAssplosion
if you want to be awesome about it).Create a new Prefab and name it
Explosion
. Drop it into your Prefabs folder to keep the project organized.From the Hierarchy panel, click-and-drag the Explosion Particle System into the Explosion Prefab container.
Re-select the Explosion GameObject in the Hierarchy panel. Point your mouse at the Scene view, and press the F key to bring the new Particle System into focus.
In the Inspector panel, adjust the Explosion settings thusly:
Duration:
0.1
Looping: Unchecked
Start Lifetime:
0.15
Start Speed:
60
Start Size:
5
Emission...