Пример #1
0
        private void checkForAnimableGUIElement(GameObject panel, bool state)
        {
            AnimableGUIElement aux = panel.GetComponent <AnimableGUIElement>();

            if (aux)
            {
                aux.setState(state);
            }
            else
            {
                panel.SetActive(state);
            }
        }
Пример #2
0
        private IEnumerator delayedCheckForAnimableGUIElement(GameObject panel, bool state)
        {
            AnimableGUIElement aux = panel.GetComponent <AnimableGUIElement>();

            if (aux)
            {
                aux.setState(state);

                // Wait until the animation is finished
                while (!aux.endAnimationsFlag)
                {
                    yield return(null);
                }
            }
            else
            {
                panel.SetActive(state);
            }

            // Extra time added between gui animated elements
            yield return(new WaitForSeconds(transitionDelay));
        }