Author Topic: How do I do this with nGUI?  (Read 2861 times)

bravery

  • Guest
How do I do this with nGUI?
« on: September 23, 2012, 05:54:03 AM »
Hello,

I'm developing my GUI using nGUI, and I'm thinking in having a special pause GUI for my game in the following manar once the game resume after being paused:
1- Hide the GUI created by nGUI.
2- Show a count down from 3 to 1, where in your mobile you will see a big number 3 for a second, then number 3 will disapear and number 2 will apprear for another seond, then number 2 will disapear and number 1 will appear for one second.
3- The the game will resume and the GUI will show up.

Can you please advise how should I do this?

Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How do I do this with nGUI?
« Reply #1 on: September 23, 2012, 09:41:32 AM »
3, 2, 1 will be large sprites. NGUITools.SetActive(yourUIPanel, false), NGUITools.SetActive(yourCountdownPanel, true). Countdown logic in a custom script that gets reset in OnEnable.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: How do I do this with nGUI?
« Reply #2 on: September 23, 2012, 12:04:02 PM »
You code stuff.

3,2,1 could be individual sprites, or it could use a font. It's really up to you. You trigger the unpausing process on a button, which starts your own logic that shows the numbers and when the numbers reach 0, you actually unpause the game and show the UI.