Ejemplo n.º 1
0
    IEnumerator checkMove()
    {
        yield return(new WaitForSeconds(.5f));

        if (otherTile != null)
        {
            if (!isMatched && !otherTile.GetComponent <Tile>().isMatched)
            {
                previousRow    = otherTile.GetComponent <Tile>().row;
                previousColumn = otherTile.GetComponent <Tile>().column;
                otherTile.GetComponent <Tile>().row    = row;
                otherTile.GetComponent <Tile>().column = column;
                row    = previousRow;
                column = previousColumn;
                grid.ResetCombo();
            }
            else
            {
                grid.DestroyMatches();
                grid.AddCombo();
            }
        }
        otherTile = null;
    }