Displaying the power cell HUD
Now that we have our power cell collectables and inventory in place, we'll need to show the player a visual representation of what the player has collected. The textures imported with the Book
Assets
have been designed to clearly show that the player will need to collect four power cells to fully charge the door. By swapping an empty power cell texture image on-screen for one with 1
unit of charge, then for an image with 2
units of charge, and so on, we can create the illusion of a dynamic interface element. This is shown in the following image:
The Book Assets | Textures folder contains the five image files we need ...
Get Unity 3.x Game Development Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.