Пример #1
0
        IEnumerator CoBackGroundDownloadResource(string label)
        {
            if (label.Length > 1 && label[0] == '*')
            {
                label = label.Substring(1);
            }

            AdvScenarioData data = FindScenarioData(label);

            if (data == null)
            {
                Debug.LogError(label + " is not found in all scenario");
                yield break;
            }
            if (!data.IsAlreadyBackGroundLoad)
            {
                data.Download(this);
                foreach (AdvScenarioJumpData jumpData in data.JumpScenarioData)
                {
                    //シナリオファイルのロード待ち
                    while (!IsLoadEndScenarioLabel(jumpData))
                    {
                        yield return(0);
                    }
                    yield return(StartCoroutine(CoBackGroundDownloadResource(jumpData.ToLabel)));
                }
            }
        }
Пример #2
0
        //シナリオのリソースをロード
        IEnumerator CoBackGroundDownloadScenarioResource(string scenarioLabel)
        {
            //シナリオファイルのロード待ち
            while (!IsLoadEndScenarioLabel(scenarioLabel))
            {
                yield return(0);
            }
            AdvScenarioData data = FindScenarioData(scenarioLabel);

            if (!data.IsAlreadyBackGroundLoad)
            {
                data.Download(this);
                foreach (string jumpLabel in data.JumpScenarioLabels)
                {
                    yield return(StartCoroutine(CoBackGroundDownloadResource(jumpLabel)));
                }
            }
        }
Пример #3
0
        IEnumerator CoBackGroundDownloadResource(string startScenario)
        {
            while (loadingScenarioCount > 0)
            {
                yield return(0);
            }

            AdvScenarioData data = FindScenarioData(startScenario);

            if (!data.IsAlreadyBackGroundLoad)
            {
                data.Download(this);
                foreach (AdvScenarioJumpData jumpData in data.JumpScenarioData)
                {
                    //シナリオファイルのロード待ち
                    while (!IsLoadEndScenarioLabel(jumpData))
                    {
                        yield return(0);
                    }
                    yield return(StartCoroutine(CoBackGroundDownloadResource(jumpData.ToLabel)));
                }
            }
        }