Exemple #1
0
    public void SwapTiles(GridTileBehaviour clicked, GridTileBehaviour target)
    {
        if (!playerControlsEnabled ||
            !BoardUtils.IsDirecNeighbor(clicked.Index, target.Index))
        {
            return;
        }

        StartCoroutine(
            SwapTilesRoutine(
                GridManager.GetGem(clicked.Index),
                GridManager.GetGem(target.Index))
            );
    }