官术网_书友最值得收藏!

To get the most out of this book

This book uses the Xcode IDE version 10 (Swift 4.2). If you use a different version of Xcode, you will likely encounter syntax differences; Apple is constantly upgrading Swift's syntax. You can use Xcode's Edit | Convert | To Current Swift Syntax to update the code examples in this book to a newer version of Xcode.

Visit https://developer.apple.com/xcode/to download Xcode.

You will need an Apple developer account to integrate your apps with Game Center and submit your games to the App Store.

To run ARKit games you will need an iPhone SE or higher, a fifth-generation iPad, or an iPad Pro. To run the Multipeer AR project you will need two devices because it can't be tested on an emulator.

Download the example code files

You can download the example code files for this book from your account at http://www.packt.com. If you purchased this book elsewhere, you can visit http://www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at http://www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the on-screen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Swift-Game-Development-Third-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example; "Locate the Enemies folder in the downloadable asset bundle."

A block of code is set as follows:

import SpriteKit

class Coin: SKSpriteNode, GameSprite { 
var initialSize = CGSize(width: 26, height: 26) 
var textureAtlas: SKTextureAtlas = 
SKTextureAtlas(named: "Environment") 
var value = 1

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import SpriteKit
import ARKit

class Scene: SKScene {
    
   
 var crosshair: SKSpriteNode!
 let scoreText = SKLabelNode(text: "00")

Bold: Indicates a new term, an important word, or words that you see on the screen, for example, in menus or dialog boxes, also appear in the text like this. For example: "Select System info from the Administration panel."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 浦城县| 新泰市| 兴山县| 池州市| 汾阳市| 商丘市| 泽州县| 平乐县| 阳曲县| 湟中县| 柳河县| 禄劝| 桃江县| 岐山县| 视频| 兰考县| 临夏市| 高邮市| 烟台市| 小金县| 永修县| 获嘉县| 阿荣旗| 土默特右旗| 邵阳市| 岚皋县| 卢龙县| 育儿| 湘西| 曲靖市| 伊通| 甘谷县| 丹棱县| 广汉市| 抚州市| 奉贤区| 花垣县| 鹤壁市| 和林格尔县| 甘泉县| 凤翔县|