示例#1
0
 private void LoadNextLevel()
 {
     if (levelIndex + 1 >= levels.Length)
     {
         return;
     }
     loadedSettings = levels[++levelIndex];
     scoreDisplayer?.SetLevel(CurrentLevel.Level);
     OnNextLevelLoadedEvent?.Invoke();
 }
示例#2
0
    public void StartBoardLevelManager(IGameScoreDisplay _scoreDisplayer)
    {
        scoreDisplayer = _scoreDisplayer;
        levelIndex     = 0;
        loadedSettings = levels[levelIndex];

        boardScoreCalculator = new BoardHighscoreCalculator();
        boardScoreCalculator.OnUpdateScoreAction     = OnUpdateScoreHandler;
        boardScoreCalculator.OnUpdateHighScoreAction = OnUpdateHighScoreHandler;
        boardScoreCalculator.InitializeCalculator(0);

        Debug.Assert(levels.Length > 0, "Levels not loaded");
        scoreDisplayer?.SetLevel(CurrentLevel.Level);

        progressVisual?.ClearBorders();
    }