Example #1
0
        private IEnumerator InitializeSceneEnumerator(object param)
        {
            _currentOpenScene = GetCurrentSceneBase();
            var initialize = _currentOpenScene.InitializeEnumerator(param);

            while (initialize.MoveNext())
            {
                yield return(null);
            }
        }
Example #2
0
        /// <summary>
        /// Scene を読み込む
        /// </summary>
        private IEnumerator LoadWindowAndScreenEnumerator(
            string loadWindowPath,
            string loadScreenPath,
            object param,
            Action onComplete)
        {
            _currentOpenScene = GetCurrentSceneBase();

            if (CurrentWindowPath != loadWindowPath)
            {
                var onCloseScreen = _currentOpenScene.OnCloseScreenEnumerator();
                while (onCloseScreen.MoveNext())
                {
                    yield return(null);
                }

                var onOpenScene = _currentOpenScene.OnCloseWindowEnumerator();

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

            if (CurrentScreenPath != loadScreenPath)
            {
                var onCloseScreen = _currentOpenScene.OnCloseScreenEnumerator();
                while (onCloseScreen.MoveNext())
                {
                    yield return(null);
                }
            }

            var onOpenWindow = _currentOpenScene.OnOpenWindowEnumerator(loadWindowPath, loadScreenPath, CurrentWindowPath, CurrentScreenPath);

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

            onComplete?.Invoke();
            _isLoadingScene = false;
        }
Example #3
0
        /// <summary>
        /// Scene を読み込む
        /// </summary>
        private IEnumerator LoadWindowAndScreenEnumerator(string loadWindowPath, string loadScreenPath, object param, Action onComplete)
        {
            _currentOpenScene = GetCurrentSceneBase();

            if (CurrentWindowPath != loadWindowPath)
            {
                yield return(_mono.StartCoroutine(_currentOpenScene.OnCloseScreenEnumerator()));

                yield return(_mono.StartCoroutine(_currentOpenScene.OnCloseWindowEnumerator()));
            }

            if (CurrentScreenPath != loadScreenPath)
            {
                yield return(_mono.StartCoroutine(_currentOpenScene.OnCloseScreenEnumerator()));
            }

            yield return(_mono.StartCoroutine(_currentOpenScene.OnOpenWindowEnumerator(loadWindowPath, loadScreenPath, CurrentWindowPath, CurrentScreenPath)));

            onComplete?.Invoke();
            _isLoadingScene = false;
        }
Example #4
0
 private IEnumerator InitializeSceneEnumerator(object param)
 {
     _currentOpenScene = GetCurrentSceneBase();
     yield return(_mono.StartCoroutine(_currentOpenScene.InitializeEnumerator(param)));
 }