Ejemplo n.º 1
0
    //Moveing and swaping blocks
    public void MoveBlock(GameObject block, Direction direction)
    {
        int count = 0;

        _field.SwapBlocksAction(block, direction);
        do
        {
            _field.CheckMetches();
            count   = _field.GetEmptyCount();
            _score += count;
            _field.DestroyBlocks();
            _field.MoveBlocksToEmptyCell();
        } while (count != 0);
        _uIManager.UpdateScore(_score);
    }