Example #1
0
    public IEnumerator CheckMoveCo()
    {
        yield return(new WaitForSeconds(.5f));

        if (otherDot != null)
        {
            if (!isMatched && !otherDot.GetComponent <Dot>().isMatched)
            {
                otherDot.GetComponent <Dot>().row    = row;
                otherDot.GetComponent <Dot>().column = column;
                row    = previousRow;
                column = previousColumn;
                yield return(new WaitForSeconds(.5f));

                board.currentDot   = null;
                board.currentState = GameState.move;
            }
            else
            {
                board.DestroyMatches();
            }
        }
    }