示例#1
0
        private void CurrentTetrominoOnLanded(int numOfMoves)
        {
            int linesCleard = _grid.ClearFullLines();

            if (linesCleard > 0)
            {
                _gameState.LinesCleared += linesCleard;
                _gameState.Level         = _levelManager.GetCurrentLevel();
                _soundManager.PlayLineClearedSound();
            }

            _gameState.Score += _scoreCalculator.GetScoreForClearedLines(linesCleard) +
                                _scoreCalculator.GetScoreForTetromino(numOfMoves);

            UnbindCurrentTetromino();
            _currentTetromino = _nextTetromino;
            InitializeCurrentTetromino();

            _nextTetromino = CreateTetromino();
            SetUpPreview();
        }