public void UpdateLevelProgress() { int progress = LevelProgress.GetProgress(); for (int i = 0; i < levelItems.Count; i++) { if (i <= progress) { levelItems[i].GetComponent <CanvasFadeBehaviour>().Show(false); } else { levelItems[i].GetComponent <CanvasFadeBehaviour>().Hide(false); } } }
public void StartNextLevel() { curLevelIndex++; if (LevelProgress.GetProgress() < curLevelIndex) { LevelProgress.SetProgress(curLevelIndex); } if (curLevelIndex >= curLevelSeries.Length) { //curLevelIndex = -1; tileManager.InitTiles(); PageNavigationManager.GetInstance().ChangePage("level"); } else { Debug.Log("Level: " + curLevelIndex + "/" + curLevelSeries.Length); StartGame(curLevelSeries[curLevelIndex]); } }