Summary

Our SceneBackground is a tool that can take a lot of different types of sprites that can all have their own settings for movement purposes.

We also began working with Unity 5's UI system. This allows you to create a UI screen that will dynamically stay true to what we want, irrespective of the screen size or pixel density. We also created a pause button that will change the time scale of the game down to zero, which prevents the game elements from running. Finally, we created a restart button that can be hidden or shown to the user. It also fades out and fades in the screen when you reset the Character and LevelPieces back to default.

Finally, we used the PlayerPrefs class to save data to the local machine so that the user can keep their coin score, irrespective of whether they stop playing.

This chapter has done a lot of things that are a bit more technical than what we have done before. There has been a lot of code updates, fixes, changes, and brand new code as well. If you are new to this, take it slow. The topics in this chapter can make game development challenging, but I assure you that if you keep pace, you will begin to understand it.

In the next chapter, we will take a look at how to create the main menu and make sure that iAds, leaderboards, store purchases, and achievements are all functional in the Main menu.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset