Exemple #1
0
        public void SwitchUIPanel(UI_Panel panel)
        {
            if (panel == null)
            {
                return;
            }

            StartCoroutine(ISwitchPanel(panel));
        }
Exemple #2
0
        private IEnumerator ISwitchPanel(UI_Panel panel)
        {
            if (currentPanel)
            {
                currentPanel.Close();
                yield return(new WaitWhile(() => currentPanel.IsAnimating));
            }

            currentPanel = panel;
            yield return(new WaitForSeconds(panelSwitchDelay));

            currentPanel.Open();
            yield return(new WaitWhile(() => currentPanel.IsAnimating));
        }