Description
***README***
Welcome to the README file for Info Gamer’s Health Bar Prefabs
<File System>
InfoGamerAssets
>PlayerHealthBar
>>Demos
>>Prefabs
>>Scripts
>>UISprites
<Included Files>
Scenes: HealthBarDemo
Prefabs: MainHealthBarPrefab, WorldSpaceHealthBarPrefab, PlayerDemo, EnemyDemo, HealthControlDemo
<About>
There are two parts to this package the first is the MainHealthBarPrefab. This prefab is a screen space overlay object which is meant for the main player’s health. This features a verticle fill image in the bottom left corner. The second part is the WorldSpaceHealtBarPrefab this is a world space overlay canvas meant for other avatars in your game. This feature a horizontal fill image that floats about the avatars.
<How to use>
- Attach the health script to avatar objects.
- Set MaxHealth variable in the inspector.
- Drag the MainHealthBarPrefab on to screen space canvas or WorldSpaceHealthBarPrefab on to avatar objects.
- Set the Health Bar variable of the Health script to be the health bar object.
- Set the Health Stat variable of the Health Bar Script to be the Health script of the avatar object.
- Then use the public TakeDamage, HealHealth, and LevelUpHealth function of the Health script to change the current and max health of the avatar objects.
View the demo scenes to get an idea of how this add-on should behave.
<Features>
MainHealthBarPrefab: Verticle fill Image that displays the current health of the player out of the max health.
WorldSpaceHealthBarPrefab: Horizontal fill Image that displays the current health of the player out of the max health.
<Customize your project>
You can change the visual image of the main health bar or the color of the fill. You might also consider changing the size or location of the health bars.
<Final Notes>
Remember to use the public TakeDamage, HealHealth, and LevelUpHealth function of the Health script to change the current and max health of the avatar objects.
Reviews
There are no reviews yet.