/// <summary> /// 로딩 전체 감싸기 /// </summary> /// <returns></returns> private IEnumerator Loading() { // 상태 변경 SetState(StateType.Load); // 로딩 UI _UILoading.Open(); // 구성요소 초기화 InitTestInfo(); InitBeatInfo(); SetScore(0); InitRandom(); InitCamera(); InitGameOvered(); _uiProgressBar.SetRate(0.0f); // 노래 로딩 if (_srcSong.clip == null) { _srcSong.clip = Resources.Load <AudioClip>(_songRoot + "/" + _beatInfo._namespace); _totalFrame = (int)(_srcSong.clip.length * (float)Define._fps); yield return(null); } else { _srcSong.Stop(); } // 특화 정보 로딩 RemoveAllMover(); yield return(StartCoroutine(_logic.LoadContext())); // 여유 프레임 _UILoading.Close(); yield return(null); // 로딩 끝 StartPlay(); }
private IEnumerator Loading() { // 상태 변경 SetState(StateType.Load); // 로딩 UI _uiLoading.Open(); InitBeatInfo(); SetScore(0); InitRandom(); InitCamera(); // 특화 정보 로딩 RemoveAllMover(); yield return(StartCoroutine(_logic.LoadContext())); // 여유 프레임 _uiLoading.Close(); yield return(null); // 로딩 끝 StartPlay(); }