Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: bravery on September 23, 2012, 05:54:03 AM

Title: How do I do this with nGUI?
Post by: bravery 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.
Title: Re: How do I do this with nGUI?
Post by: ArenMook 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.
Title: Re: How do I do this with nGUI?
Post by: Nicki 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.