Graphics Reference
In-Depth Information
2 Building the Core
Game Framework
In this chapter, we look at the structure of the base project, to which we will be adding all
of the game script components, and the thinking behind it. This chapter will give context
to the design decisions made in the core framework as well as provide a good base for
understanding how the individual code recipes work together and why they may some-
times have dependencies on other components.
he framework for this topic (as seen in Figure 2.1) features six main areas:
1. Game Controller
The game controller acts like a central communication script for all of the differ-
ent parts of the game. In a way, it is the main glue that holds together the various
components that make up the game.
2. Scene Manager
This script deals with the loading and saving of scenes. Scenes are what Unity calls
its level files.
3. UI Manager
The UI manager draws all of the main in-game user interface elements, such as
score display and lives.
4. Sound Manager
The sound manager handles sound playback. The manager holds an array con-
taining the AudioClips of possible sounds to play. When the game first begins, the
Search WWH ::




Custom Search