O'Reilly logo

Building an RPG with Unity 5.x by Vahé Karamian

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

Enemy stats in the HUD

We have not really discussed how to handle and manage the statistics and the visual representation of the NPC with the player. It is now time to do just that! So we need to decide what it is that we want to display as information to the player. For the moment, let's keep it simple and just display the basic health and strength of the enemy.

The question is, what is the best way to display this information? Should we display the information based on a distance threshold between the player character and the NPC, or should we display it when the player requests it at some time during gameplay?

Let's go ahead and take the first scenario. We will display the information for the NPC upon reaching a certain distance between the player ...

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