Ejemplo n.º 1
0
    private void DeleteRows()
    {
        var fullRowsCount = 0;

        for (int y = 0; y < _settings.TransformsYCount; y++)
        {
            if (IsRowFull(y))
            {
                DeleteRow(y);
                DecreaseRowsAbove(y + 1);
                y--;
                fullRowsCount++;
            }
        }
        if (fullRowsCount > 0)
        {
            _scoreManager.AddLineScore(fullRowsCount);
            EventsObserver.Publish(new IPlaySoundEvent("Drop"));
        }

        EventsObserver.Publish(new ISpawnEvent());
    }