Demo Package
A unity demo package that can help you if you are having trouble trying to create the dynamic change of size of the GUI.
The logic followed by the scripts is:
AttrBar.cs: The script responsible for filling the status bar considering the values on the PlayerStats class;
DynamicAttrBar.cs: The script responsible for changing the size of the sprites of the status bar accoding the MAX stat value;
PlayerStats.cs: The script responsible for set the stats to be readen by the AttrBar class.
This is a demo of how to make the dynamic change on the size of the bars, the main purpose of the asset. The sprites are already edited and sliced in the proper way, if you want to implement that on your game you only need to change the playerStats scripts to the stat script you use for your character and read the values from there. About the animations you can add the animation component to the UI elements and for example do a animation named "Break" for the border or the sprite that is above the others and play it when the character losses all his HP.
Files
Get Dynamic Status Bars
Dynamic Status Bars
Pixel-UI
Status | Released |
Category | Assets |
Author | Otsoga |
Genre | Adventure |
Tags | dynamic, free, Graphical User Interface (GUI), Pixel Art, User Interface (UI) |
More posts
- Added sprite sheets of the animationsJul 01, 2024
Leave a comment
Log in with itch.io to leave a comment.