public void HandleTouchDown(Vector2 touch) { if (selectedTile != null) { selectedTile.Select(false); } selectedTile = TileCloseToPoint(touch); if (selectedTile != null) { selectedTile.Select(true); } }
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(); } }
public void HandleTouchDown(Vector2 touch) { selectedTile = TileCloseToPoint(touch); if (selectedTile != null) { selectedTile.Select(true); selectedTiles.Add(selectedTile); SubmitTile(); } }
private void ClearSelection() { foreach (var t in selectedTiles) { t.Select(false); } if (selectedTile != null) { selectedTile.Select(false); } selectedTiles.Clear(); }