This post will document any development I had to do with the games HUD and/or Menus, as I wasn’t the main developer on those aspects I decided to compile them all into this one post.

This was an easy bug to fix, as the Game Manager script on the GameManager gameobject was simply missing a reference to the game over menu, therefore it wasn’t appearing when the player died. All I had to do was drag the game over menu in the hierarchy into the Game Manager script and save the scene.
The other bug where the animation of the tree in the Main Menu scene would freeze was caused by the Time.timeScale() function in the pause menu and game over menu. Both these menus set the Time.timeScale() to zero effectively freezing the game but wouldn’t set it back if the player pressed the Main Menu button. Therefore, the tree animation would be frozen – to fix this I simply reset the Time.timeScale() to 1 if the player presssed the Main Menu button.

The Terra Shard Counter in the HUD wasn’t being updated for two reasons: The Terra Shard item wasn’t updating the PlayStatsManager’s terraShardCount when the player picked it up and the PlayerInventory script wasn’t being updated when the player spent Terra Shards at the Tree of Sorrow. Which were two simple fixes.

I added an Update() method in the PlayerInventory script that updates its currentTerraShard int constantly.

In the TerraShard gameobject’s script, I added code that updates both the PlayerInventory’s and the PlayerStatsManger’s terraShardCount ints.

After our Environment Designer, Xane, implemented a fade in and out of every scene, there were a few bugs that had to be fixed. The first one being the restart button not working in the dungeon scene, however this was only due to a missing reference in the GameManger script. Therefore, I changed the SceneTransition from being private to public (as the code in the Start() method was failing to find it) and referenced it manually in the inspector.
This second bug caused the screen to stay completely black after a scene transition, however this was only because the new transition code from Xane forgot to set the Time.timeScale() back to 1. This changed allowed the fade in to occur naturally, preventing the black screen bug.

This pop up ‘E’ button would be for the Tree of Sorrow or Boss Gateway, essentially it checks if the player collides with a trigger tagged with “Interactable”, if it does then the ‘E’ pop up appears.