Exemplo n.º 1
0
 public void LevelUp()
 {
     LevelId++;
     while (LevelId.ToString().Contains("Boss"))
     {
         LevelId++;
     }
     SetLevelNum();
 }
Exemplo n.º 2
0
    private IEnumerator LoadLevel(LevelProgressionHandler.Levels levelId)
    {
        GameData.Instance.Level = levelId;
        Toolbox.Instance.Debug  = false;
        AsyncOperation levelLoader;

        if (levelId.ToString().Contains("Boss"))
        {
            levelLoader = SceneManager.LoadSceneAsync("Boss");
        }
        else
        {
            levelLoader = SceneManager.LoadSceneAsync("Levels");
        }
        // TODO training

        LoadingOverlay.GetComponent <LoadScreen>().ShowLoadScreen();

        while (!levelLoader.isDone)
        {
            yield return(null);
        }
    }