Exemplo n.º 1
0
        private IEnumerator LoadLevelSequence(LevelInfo levelInfo)
        {
            SoundManager.PlaySound(_sfxStartLevel);
            LevelProgress.CreateNewProgressData(levelInfo.DisplayName, levelInfo.SceneName, levelInfo.LevelRewards, levelInfo.HighestWaveDefeated);
            Save();
            Debug.Log("--- Overworld: Exit ---");

            yield return(new WaitForSeconds(_screenFader.FadeOut()));

            SceneManager.LoadScene(levelInfo.SceneName);
        }