Пример #1
0
    IEnumerator ButtonsFadeIn()
    {
        yield return(new WaitForSeconds(0.1f));

        while (textBGFade.CheckFading() || textFade.CheckFading() || buttonHolderFade.CheckFading())
        {
            yield return(new WaitForSeconds(0.1f));
        }
        ButtonFade[] theButtons     = FindObjectsOfType <ButtonFade>();
        ButtonFade   previousButton = null;

        for (int i = theButtons.Length - 1; i >= 0; i--)
        {
            if (previousButton != null)
            {
                yield return(new WaitForSeconds(0.1f));

                while (previousButton.CheckFading())
                {
                    yield return(new WaitForSeconds(0.1f));
                }
            }
            theButtons[i].FadeIn();
            previousButton = theButtons[i];
        }
    }
Пример #2
0
 private void Awake()
 {
     Instance = this;
     Invoke("setFadeOut", delayOut);
 }