O'Reilly logo

Swift Game Development - Third Edition by Stephen Haney, Siddharth Shekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. 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.
  2. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required