We will start with adding a pause dialog to allow the player to pause the game:
Resourcesand call it
Dialogs. Then, open the book's supporting files in
Chapter_09/Assets/Dialogsand add all the images to that group.
Scenesgroup. Name the class
PauseDialogand make it a subclass of
Note that it is a subclass of
CCScene. We have used a similar approach when we created the
HUDLayer class. You can read Chapter 6, Rendering Text, to refresh your memory. We are going to use
CCNode as a base class for all dialogs.
PauseDialog.hfile and add the following property. It will allow the object, which creates the dialog ...