Beispiel #1
0
    public IEnumerator LoadStage()
    {
        AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("Stage0" + stageIdx, LoadSceneMode.Additive);        //비동기 방식으로 현재 씬에 불러올 씬을 병합

        yield return(asyncLoad);                                                                                    //불러올 씬이 로드될 때 까지 대기

        if (asyncLoad.isDone)                                                                                       //씬 병합이 정상적으로 이루어 지면 이후 초기화 진행
        {
            GetUserData();
            PlayerInitialize();
            EnemySpawnPointInit();
            MonsterPoolInitialize();
            cameraPosition.FindPlayer();
            GetAudioSource();
            GetStageLengthInfo();
            hm.HUDInitialize();
            loadingPanel.SetActive(false);
            inGameUi.SetActive(true);
        }
    }