Пример #1
0
        /// <summary>
        /// 現在開かれている Screen が閉じられる前の処理
        /// </summary>
        public IEnumerator OnCloseScreenEnumerator()
        {
            var onBeforeClose = CurrentOpenScreen.OnBeforeCloseScreenEnumerator();

            while (onBeforeClose.MoveNext())
            {
                yield return(null);
            }

            var onClose = CurrentOpenScreen.OnCloseScreenEnumerator();

            while (onClose.MoveNext())
            {
                yield return(null);
            }

            var onAfterClose = CurrentOpenScreen.OnAfterCloseScreenEnumerator();

            while (onAfterClose.MoveNext())
            {
                yield return(null);
            }

            CurrentOpenScreen.gameObject.SetActive(false);
        }
Пример #2
0
        /// <summary>
        /// 現在開かれている Screen が閉じられる前の処理
        /// </summary>
        public IEnumerator OnCloseScreenEnumerator()
        {
            yield return(StartCoroutine(CurrentOpenScreen.OnBeforeCloseScreenEnumerator()));

            yield return(StartCoroutine(CurrentOpenScreen.OnCloseScreenEnumerator()));

            yield return(StartCoroutine(CurrentOpenScreen.OnAfterCloseScreenEnumerator()));

            CurrentOpenScreen.gameObject.SetActive(false);
        }