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:
PauseDialog.mfile and import the
#import "LoadingScene.h" #import "MenuScene.h"
btnRestartTapped:method and replace its contents with the following code: