售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Unity iOS Game Development
Table of Contents
Learning Unity iOS Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Requirements and Preparation Work
Requirements
Downloading and installing Unity 5
Installing the iOS SDK plugin
Creating and logging in to the iTunes Connect profile
Creating the Bundle ID and Game App
Setting up App pricing and territories
Creating an in-app purchase
Game Center, leaderboards, and achievements
The Main App settings
Enabling iAds
Setting up iOS Native in Unity
Certificates and provisions on Mac
Why iTunes Connect is important
Summary
2. Player Input for Mobile Devices
Creating the C# input class
Including system
What is Touch?
Our own Touch
Global variables
Creating the Input GameObject
Calculating the TouchInput function
The Start function
Starting to work with Update
The in-editor input logic
Testing in editor
Input for the Touch device
Wrapping up
Summary
3. Player Character, Obstacles, and Pickups
What is a character?
What is a pickup?
What is an obstacle?
Creating the character
Creating the character controller
Creating the Character GameObject
Adding Rigidbody 2D
Adding Box Collider 2D
Writing the character code and connecting the PlayerInput class to it
Character attributes
PlayerInput
The KillCharacter function
Creating the coin pickup
Creating the obstacle
Summary
4. Editor Tool, Prefabs, and Game Level
Making the sprite tile editor tool
The SpriteTiler C# class
Global variables
The MenuItem creation
The OnGUI function
The GUILayout and OnGUI setup
The OnGUI create tiled button
The CreateSpriteTiledGameObject function
Testing the SpriteTiler file
Sprite Tiler wrap-up
The prefab creation
Coin prefabs
Level piece prefabs
Further setup of the level pieces
The level piece code
The level piece manager code
Setting up the LevelPieceManager GameObject
Adding coins and obstacles to LevelPieces
Managing coins and obstacles with the LevelPiece code
Resetting coins
Resetting the coin in LevelPiece
Summary
5. Scene Background, the Game User Interface, and the Save Profile
Creating the scene background
Adding movement to SceneBackgroundElement
Creating the game user interface
The GameInfo class
Importing UI images
Creating the UI Canvas
The coin background
The distance background
The pause button
Updating code to show coins and distance
Updating the coin class
The restart button
The fade object
The restart functionality
The Awake function
The Update function
The RestartGame function
The RestartLevelAndCharacter function
FadeToBlack and FadeToNormal functions
The HideRestartButton function
The ResetLevelPieces function in LevelPieceManager
Updating Character To Reset
Connecting RestartGame to the RestartButton click
PlayerPrefs game save object
Summary
6. Main Menu, iAds, Leaderboards, Store Purchases, and Achievements
Building the main menu UI
Adding button images
PlayButton
LeaderboardButton
AchievementButton
RemoveAdsButton
RestorePurchaseButton
The Purchase Remove iAds panel
RemoveAdsBackgroundScreen
RemoveAdsScreen
RemoveAdsTextOption
ForCoin
ForCoinText
ForCash
ForCoinText
CloseRemoveAds
The Purchase Succeeded panel
PurchaseSucceededBackgroundScreen
PurchaseSucceededScreen
PurchaseSucceededText
PurchaseSucceededAccept
PurchaseSucceededAcceptText
PurchaseSucceededClose
The Purchase Failed panel
Connecting the MainMenuUI reference to GameInfo
The menu code
The GameInfo menu code
The LevelPieceManager menu code
The character menu code
Completing changes in Unity
Adding the BackToMenu button in GameUI
Code for leaderboard and achievement buttons
Code for achievements
Game center events
SubmitAchievementProgress
SubmitAchievementAsWhole
SubmitLeaderboardScore
The character achievement code
Displaying iAds
Purchasing remove iAds
New RemoveiAds Purchase for coins
The In App Purchase code
The Purchase RemoveIAds functions
Purchasing buttons
Restoring purchases
Summary
7. Game Builds and Submission to Apple
Setting up Unity for iOS builds
Creating a test build
Making a release build
Submitting the game to Apple
Congratulations!
What next?
Testing
I want to learn more about programming
I want to create a 3D game
3D programs
Creating textures
Furthermore
Using the Internet
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜