Chapter 7: Creating a Game Loop and Mock Test

In the previous chapter, we moved from the testLevel scene (where we controlled the player ship) to a shop scene (buying and calibrating the player's ship). In this chapter, we will be following a similar trend of stretching out to the rest of the other game scenes in our Scene folder (found in the Project window in the Assets folder).

As part of scene management, all games we play have something called a "Game Loop" – if you're not familiar with the term, it basically means our game will have alternative routes to take. Each route will load a particular scene. We will need to cater for either outcome at each stage of the game.

Eventually, all game loops will loop back to somewhere near the beginning. ...

Get Unity Certified Programmer Exam Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.