O'Reilly logo

Unity 3.x Game Development Essentials by Will Goldstone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

Displaying the power cell HUD

The Book Assets | Textures folder contains the five image files we need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required