O'Reilly logo

Getting Started with SpriteKit by Jorge Jordán

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

Transitions and scenes

Usually, games comprise more than one scene. For example, games use a different scene to show a Configuration menu, to show the classification table once the game is over, to show a screen with in-app purchases, and so on.

Due to this, we need a way to move between the scenes. The solution that's provided by most game engines is transitions, which are also known as the SKTransition instances in SpriteKit.

The SKTransition class

The SKTransition class inherits from NSObject and provides us with the ability of creating animated transitions between the scenes of the game.

We have several methods in this class that will allow us to create different types of transitions. For example, we can choose one of the following methods:

  • crossFadeWithDuration ...

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