Book Image

Learning Unity iOS Game Development

Book Image

Learning Unity iOS Game Development

Overview of this book

Table of Contents (14 chapters)
Learning Unity iOS Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
6
Main Menu, iAds, Leaderboards, Store Purchases, and Achievements
Index

Chapter 3. Player Character, Obstacles, and Pickups

The player character is the visual representation of what the user will input to the device. In the game we're creating, it will be quite simple. Our character will be designed to perform only three things: change its direction based on the swipe input of the user, collide with pickups in the world, and collide with obstacles in the world.

The swipe direction will determine the direction the character will move and with how much force it will move. The collision with pickups will add to a collection of points for the user. Also, the collision with obstacles will "kill" the character and end the game.