Ejemplo n.º 1
0
 public void ChangeScene(string sceneName, LevelSO.Level lvl, LevelSO.Stage stg)
 {
     SoundManager.instance.StopMusic(true, () =>
     {
         LevelManager._instance.ChangeLevel(sceneName, lvl, stg);
     });
 }
Ejemplo n.º 2
0
 public void Build(LevelSO.Level lvl, LevelSO.Stage stg)
 {
     _lvl = lvl;
     _stg = stg;
     //GetComponent<Image>().color = new Color(120, 65, 255, 1);
     buttonTxt.text = stg.name;
     for (int i = 0; i < GameManager.instance.playerScore.GetScore(lvl.id, stg.id); i++)
     {
         transform.Find("Score").GetChild(i).Find("Aselak").GetComponent <Image>().enabled = true;
     }
     AddListener();
 }
Ejemplo n.º 3
0
 public void ChangeLevel(string sceneName, LevelSO.Level lvl, LevelSO.Stage stg)
 {
     currentLevel = lvl;
     currentStage = stg;
     GameManager.instance.playerScore.lastLevel = lvl.id;
     GameManager.instance.playerScore.lastStage = stg.id;
     DataManager.data.Save();
     if (stg.cinematicSceneLabel != "" && stg.cinematicSceneLabel != null)
     {
         SceneManager.LoadScene(stg.cinematicSceneLabel);
     }
     else
     {
         SceneManager.LoadScene(sceneName);
     }
 }