Creating the Crate particle effects
We need two fun particle effects to use when the player smashes a crate. The crates that reward hearts will display a different animation than those that reward coins. First, we will create the heart particle effect by following these steps:
Add a new SpriteKit Particle File to your project (choose the bokeh particle template) and name it
HeartExplosion.sks
. You should see the particle editor open with a relaxing bokeh animation in Xcode.Using the utilities bar on the right, change the particle texture to the heart-full texture, and match the particle settings to the following screenshot. Make sure to set Blend Mode to Alpha:
You should see a single large, rotating heart floating through the particle editor. It should look something like this:
Next, we will create the particle emitter to use when the player smashes open a crate containing coins. Follow these steps to create the emitter:
Add a new SpriteKit Particle File to your project (choose the spark particle...