Thursday, 28 March 2013

GUI - Health and Mana Bar

Today i was working on another part of GUI for our game. I created Health and Mana bars inside a GUI.Window. Interesting thing about GUI.Window is that for each window you need a unique ID number which you will be using as a parameter in your function.
Here is code snippet form my GUI script, it's nice and simple.


























I was using Event.current to see if my Hp and Sp values are changing. Later on we will have to modify this script to be able to use Paul's PlayerStats script. Health bar is also dragable same as Inventory window which is giving User an option to position all GUI panels in a way he/she likes it.

And this is how it looks like in the game now.



 I'll keep you posted with more upcoming GUI.

No comments:

Post a Comment