예제 #1
0
    public void ApplyLevelProgressState()
    {
        if (!LevelHelper.CheckIfLevelExistsWithNumber(levelNumber))
        {
            levelProgressState = LevelProgressState.Unset;
        }

        spriteRenderer.color = LevelStatusAppearances.LevelStatusColors[(int)levelProgressState];
    }
예제 #2
0
    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();
        }
    }