public void SetNeighbors(SquareGrid grid) { for (int i = 0; i < block.neighbors.Length; i++) { if (block.neighbors[i] != null) { SetNeighbor((SquareDirection)i, grid.GetSquareCellFromBlock(block.neighbors[i])); } } }