public void ApplyLevelProgressState() { if (!LevelHelper.CheckIfLevelExistsWithNumber(levelNumber)) { levelProgressState = LevelProgressState.Unset; } spriteRenderer.color = LevelStatusAppearances.LevelStatusColors[(int)levelProgressState]; }
public void CompleteAllLevels() { gameStateModelRef.Get().CompletedLevels.Clear(); int highestLevel = LevelHelper.LevelCount; for (int i = 1; i <= highestLevel; i++) { if (!LevelHelper.CheckIfLevelExistsWithNumber(i)) { highestLevel++; continue; } gameStateModelRef.Get().CompletedLevels.Add(i); } if (sceneStatus.currentScene == Scenes.LevelSelect) { goToCurrentSceneEvent.Dispatch(); } }