上QQ阅读APP看书,第一时间看更新
Introduction
In the previous chapter, we discussed how to include and manipulate sprites. In this chapter, we will take a look at how to create scenes in a game, which are used to create the basics of menus in games.
Scenes are the building blocks of any game. Generally, in any game, you have the main menu scene in which you are allowed to navigate to different scenes, such as GameScene, OptionsScene, and CreditsScene. In each of these scenes, you have menus.
Similarly, in MainScene
, there is a play button that is part of a menu that, when pressed, takes the player to GameScene, where the gameplay code runs.