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 ...
Get Swift Game Development - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.