Exemple #1
0
        private void ReloadDieNextLevel()
        {
            if (progress.IsWin())
            {
                return;
            }

            if (FindObjects.PC.GetComponent <HP>().CurrentHP < 1)
            {
                SceneManager.LoadSceneAsync(0);
            }
            // progress.LevelCleared() is a sub condition of progress.IsWin().
            else if (progress.LevelCleared())
            {
                progressData.GotoNextLevel();

                Stack <IDataTemplate> dt = new Stack <IDataTemplate>();
                saveLoad.SaveDungeonLevel(new SaveEventArgs(dt));
                SceneManager.LoadSceneAsync(0);
            }
        }