Time for action – showing the game over scene
Use the following steps to create the game over scene:
- Open our Xcode project if it's not already open.
- Create a new Objective-C class inside the
- Call this class
GameOver it should be a subclass of
- Switch to the
- Using the following line of code, add a property called
@property SPTextField *message;
- Using the following line of code, add another property to indicate whether the game was won:
@property (nonatomic) BOOL gameWon;
- Switch to
- Import the
Assets.h, and the
World.h files, as shown in the following code:
- Add an initializer for this new scene, as shown in the following ...