Game Development Reference
In-Depth Information
startGameTextNode.fontSize = 20
startGameTextNode.fontColor = SKColor.whiteColor()
startGameTextNode.position =
CGPoint(x: scene!.size.width / 2, y: scene!.size.height
/ 2)
addChild(startGameTextNode)
As you look at this code, you will notice that you saw code similar to this in the previous
chapter. Once you look at the changes, run the game again. You will now see a new label
of “TAP ANYWHERE TO START!” in white letters at the center of the scene, as shown
in Figure 8-1 .
Figure 8-1 . The GameScene with the “TAP ANYWHERE TO START!” SKLabelNode
Search WWH ::




Custom Search