Book Image

Creating E-Learning Games with Unity

By : David Horachek
Book Image

Creating E-Learning Games with Unity

By: David Horachek

Overview of this book

Table of Contents (17 chapters)
Creating E-Learning Games with Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Reorganizing our GameObjects in the Scene view


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 the GameMgr script as well as the MissionMgr 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...