示例#1
0
    } //2

    public IEnumerator CheckMatchOnMove() //hareket halinde ne olacaginin hesaplanmasi
    {
        if (isColorBomb == true)
        {
            find.FindSameColor(otherDot.tag);
            isMatched = true;
            otherDot.GetComponent <Dots>().isMatched = true;
        }
        else if (otherDot != null && otherDot.GetComponent <Dots>().isColorBomb == true)
        {
            find.FindSameColor(this.gameObject.tag);
            otherDot.GetComponent <Dots>().isMatched = true;
            isMatched = true;
        }
        yield return(new WaitForSeconds(.5f));

        if (otherDot != null)
        {
            if (isMatched == false && otherDot.GetComponent <Dots>().isMatched == false) //eslesme yoksa eski yerine donmesi
            {
                otherDot.GetComponent <Dots>().row    = row;
                otherDot.GetComponent <Dots>().column = column;
                column = preColumn;
                row    = preRow;
                yield return(new WaitForSeconds(.3f));

                board.currentDot   = null;
                board.currentState = GameState.move;
            }
            else
            {
                if (end != null)
                {
                    if (end.requirements.gameType == variables.move)
                    {
                        end.decreaseMoveCount();
                    }
                }
                board.DestroyMatches();
            }
        }
    }                                                               //4