Exemplo n.º 1
0
    public void HandleTouchDown(Vector2 touch)
    {
        if (selectedTile != null)
        {
            selectedTile.Select(false);
        }

        selectedTile = TileCloseToPoint(touch);

        if (selectedTile != null)
        {
            selectedTile.Select(true);
        }
    }
Exemplo n.º 2
0
    public void HandleTouchMove(Vector2 touch)
    {
        if (selectedTile == null)
        {
            return;
        }


        var nextTile = TileCloseToPoint(touch);


        if (nextTile != null && nextTile != selectedTile && nextTile.touched)
        {
            selectedTile = nextTile;

            selectedTile.Select(true);

            if (!selectedTiles.Contains(selectedTile))
            {
                selectedTiles.Add(selectedTile);
            }

            SubmitTile();
        }
    }
Exemplo n.º 3
0
    public void HandleTouchDown(Vector2 touch)
    {
        selectedTile = TileCloseToPoint(touch);

        if (selectedTile != null)
        {
            selectedTile.Select(true);
            selectedTiles.Add(selectedTile);
            SubmitTile();
        }
    }
Exemplo n.º 4
0
    private void ClearSelection()
    {
        foreach (var t in selectedTiles)
        {
            t.Select(false);
        }

        if (selectedTile != null)
        {
            selectedTile.Select(false);
        }

        selectedTiles.Clear();
    }