A transition is used to perform animation; while shifting from one scene to another, an object called SKTransition
is used to perform this action. As we know, scenes are the basic building blocks of games. Transiting from one scene to another is often necessary in a game at various instances such as:
A loading scene, which is shown in a game while other objects are being loaded
A main menu scene, in which different options are shown to the user
A level selection menu scene, to select different levels available
A game play scene, which contains the main elements of the game
A game over scene, to represent ending of the game, and so on
When you present a new scene in a view that is already presenting a scene, you have the option of using a transition to animate the change from the old scene into the new scene. Using a transition provides continuity, so that the scene change is not abrupt and doesn't disturb the UI of the game.
When the transition occurs, the...