void ShowMoveRange() { int cellIndex = grid.CellGetIndex(tokenRow, tokenColumn); List <int> cells = grid.CellGetNeighbours(cellIndex, 100, movePoints); grid.CellBlink(cells, Color.blue, 1f); }
void ShowRange() { List <int> path = grid.CellGetNeighbours(grid.cellHighlightedIndex, 6, -1, CELLS_ALL_NAVIGATABLE); if (path != null) { for (int k = 0; k < path.Count; k++) { grid.CellFlash(path [k], Color.green, 1f); } } }
/// <summary> /// Merge cell example. /// </summary> void MergeCell(Cell cell1) { if (lastCell != null) { neighbours = grid.CellGetNeighbours(cell1); if (neighbours.Contains(lastCell)) { grid.CellMerge(lastCell, cell1); cellNoString = "Cells merged!"; } else { cellNoString = "Cell is not a neighbour!"; } lastCell = null; } else { lastCell = cell1; cellNoString = "Now, click on a second cell to merge it."; } grid.Redraw(); }