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 5. Scene Background, the Game User Interface, and the Save Profile

In order to complete the experience of playing the game, we need to finish the background for the scene and use the Unity 5 UI system to show the players what is going on with the game, as well as allow them to restart the game when they die.

The background is going to be made up of four images: a static (nonmoving) background, clouds that will hover, and two sets of mountains that will move to make the player movement seem more real.

The Unity 5 UI system is made up of a panel object that will hold children, such as text and buttons, to display what is currently going on in the game to the user. For the game, we will display a unit number that represents how far the player has moved and keep a tally of how many coins the player has picked up. We will also display a restart button the user can tap when they die, restarting the game loop.

In this chapter, we will cover the following topics:

  • Writing a C# script that will...