The following GameObjects will be the focus of our design activities in this chapter:
GameMgr
: This script will handle the choreography between the game and its particular states. It will hold the logic that moves the game from the main screen and between the individual levels.PlayerData
: This script will hold the game instance-specific attributes of the player. This will include variables such as score and current level.Game
: This is the GameObject that holds the scripts necessary for game control. It will hold theGameMgr
script as well as theMissionMgr
script._level1
: This class will hold all of the objects that are specific to the first level._global
: This class will hold all of the objects that are global or persistent across all game levels as shown in the following screenshot:
Taking an already working system of code and reworking it so that it is more extendible is called Refactoring. By refactoring our game into a number of scene files...