Welcome,
Guest
. Please
login
or
register
.
March 22, 2025, 01:48:54 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Custom Health Bars
« previous
next »
Print
Pages: [
1
]
Author
Topic: Custom Health Bars (Read 2165 times)
kodagames
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 8
Custom Health Bars
«
on:
July 20, 2014, 11:03:09 PM »
Hello,
Is it possible to create a custom health bar like in this video (frame 15:02 on the timeline)
https://www.youtube.com/watch?v=dpXJrgRJRQI#t=505
you'll see the Red icon on the left hand side what Id like to do is create a hud that fades down like in the video using Ngui.
As you can see I can easily do it with Unity by messing with a materials _CutOff (like in the video above) but then I lose out on saving on draw calls etc..
P.S.
ArenMook, Tasharen, NGUI.. Absolutely Amazing!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Custom Health Bars
«
Reply #1 on:
July 21, 2014, 04:55:01 PM »
Yeah, just use a Filled type sprite.
Logged
kodagames
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 8
Re: Custom Health Bars
«
Reply #2 on:
July 21, 2014, 10:47:09 PM »
Wow Thats AWESOME!!! especially the Filled Dir (Radial360). I had no idea this was here
I used a button to decrease the the sprite (in case it helps anyone).
#pragma strict
var
aScript
:
UISprite
;
//to access a UISprite attach the script here.
function GetFillAmount
(
)
{
aScript
.
fillAmount
-=
0.01
;
}
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Custom Health Bars