Game Development Reference
In-Depth Information
Figure 8-2 . The MenuScene when the game is over
Awesome. You have now added a simple scene transition that communicates whether the
player won or lost the game and what their score was when the game ended.
There is one last change you need to make before moving on to the next chapter, which is
to add another transition that will start a new game when the player taps the MenuScene .
The code to do this is shown in the following override of the MenuScene 's
touchesBegan() method:
override func touchesBegan(touches: NSSet, withEvent event:
UIEvent) {
Search WWH ::




Custom Search