Beispiel #1
0
    private IEnumerator ChangeMode()
    {
        yield return(StartCoroutine(levelsFileLoader.LoadLevelFile(DataStorage.CurrentGameMode)));

        if (boardGrid.GetFieldSize().x != DataStorage.FieldSize.x)
        {
            boardGrid.RespawnField();
        }
        completeLines.InitializeCompleteLines();
        boardGrid.UpdateFieldScale();
        boardGrid.FillBoard(MarkType.Cross);
        figureSpawner.DestroyFigures();
        figureSpawner.SpawnFigures(levelsParameters.CurrentFigures, DataStorage.CountOfFigures);
        boardGrid.ShowMarks(false);
        levelInfoPanel.UpdateLevelValue(DataStorage.GetCurrentLevel());
    }