
Conventions
There are several text styles in this book that refer to different type of information. For example, you will find words referring code that will look like the following line:
There are a couple of storyboard files, namely Main
and LaunchScreen
, which are responsible for showing the game screen and launch image respectively.
You will find code blocks that look like this:
import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true }
If you are expected to perform some actions on specific places of the screen you will find the instructions highlighted in the following way:
To create a new SpriteKit project, we need to open Xcode and then navigate to File | New | Project….
You will find instructions specifying the exact value you have to enter in a text field that will look like the following line:
Call it Enemy
and choose the folder where you want it to be saved.
Hints, tips, advices and notes will look like this:
Tip
Note that we just need to create a motion manager instance as thanks to it we can retrieve all the motion data we need.
Sometimes you are going to be challenged by me, requesting you to try to solve a particular situation. These challenges will be labeled as 1-star, 2-star or 3-star Challenge depending on the difficulty of the task, but they can be solved with the knowledge acquired along the book:
2-star challenge: colliding puppets