GameMaster
Even though we have created a GameMaster.cs
script, we have not really utilized it to manage our game. We have created bits and pieces of our game assets and used them to do quick testing. Now is the time to start looking at how to combine everything together and create a better game manager for our RPG.
There are a few things that I want GameMaster.cs
to perform. These are as follows:
- Having a reference to the UI controller for each particular scene
- Having a reference to the player character in the scene
- Having a reference to the non-player character(s) in the scene
- Having a reference to the audio source for control
- There should always be one instance of the
GameMaster
class available
As we create our GameMaster, we will add or subtract some of the elements as we see fit. Let's start by integrating the User Interface with the GameMaster.
Open up your Main Menu
scene. It should look something like the following screenshot:
The following screenshots display the main menu we have designed...