Rebuilding the HUD
Game development is an iterative process where elements are added in when they are needed and often reworked several times as features are implemented and feedback from users changes the direction of the project. Building a game in this fashion saves time because it allows us to get things done quickly, see the results, and adapt as we go. In the last chapter we were focused on functionality of the basic gameplay. We built a simple HUD that allowed us to spawn each piece of equipment with a click. However, we did not limit what equipment the player had access to, nor did it have the ability to restart the level or show a countdown timer displaying how much time was remaining to clear the Zone. We will need to fix all of this, plus we should allow the player to go to the Shop in case their supplies are running low. All of this can be done as follows:
We will start by adding some global variables. Create a new Script,
scr_Global_Gameplay
, and declare the necessary global...