public void Init(LevelModel level) { _levelModel = level; ScoreController.Init(level.StarScoreData); GameField.Init(_levelModel.GameFieldRawData.ToArray(), level.AvailableBlocks); BonusesController.Init(level.BonusModel, level.AvailableBonuses); MovesController.Init(level.MovesAmount, GameConstants.MovesData.MOVES_WARNING); Goals.Init(level.GoalData); }
public void StartNextLevel() { var nextLevelNumber = User.LastCompletedLevel + 1; var levelModel = LevelModel.LoadLevel(nextLevelNumber); var gameFieldRawData = levelModel.GameFieldRawData.ToArray(); var rowLength = gameFieldRawData.GetLength(0); var columnLength = gameFieldRawData.GetLength(1); _gameFieldViewController.InitGameField(rowLength, columnLength); Level.Init(levelModel); _hudViewController.Show(); }