Author Topic: Progress Bar help  (Read 3089 times)

stepollo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Progress Bar help
« on: March 12, 2015, 09:58:46 AM »
Hello, I am learning Unity and NGUI recently so probably this is a really stupid question.
I have a progress bar on my game and it works. Now i have two problems. I know that I can set a value using this code:powerbar.value = 0.9f;
But how to add a value to an existing value? For example if the bar is set to 0.5f add 0.4f and get the value of 0.9f?
And how to decrease this value over time? I don't need a pre-written code, just some tips to get this by myself! Thank you all!!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Progress Bar help
« Reply #1 on: March 12, 2015, 08:28:17 PM »
bar.value += 0.4f;?

Not sure what the difficulty would be...