June 2014
Beginner to intermediate
434 pages
9h 49m
English
There are still two buttons in the pause dialog that currently simply output to the console instead of actually doing something. Let's add the code for the Exit and Restart buttons. In addition, we are going to create a LoadingScene class, which will help us to avoid memory errors and will use UIAlertView to confirm the exit from the game.
Looks like a lot of work, so let's start:
LoadingScene in the Scenes group.PauseDialog.m file and import the LoadingScene.h and MenuScene.h headers:#import "LoadingScene.h" #import "MenuScene.h"
btnRestartTapped: method and replace its contents with the following code:-(void)btnRestartTapped:(id)sender ...