public void AddTile(Tile tile, int x, int y) { TileBrushCell cell = new TileBrushCell { x = x, y = y, tile = tile }; _cells[x][y] = cell; }
public void Reset(int width, int height) { TileBrushCell[][] newcells = new TileBrushCell[width][]; for (int i = 0; i < width; i++) { newcells[i] = new TileBrushCell[height]; if (_cells != null && i < Width) // old width { for (int j = 0; j < height; j++) { if (j < Height) { newcells[i][j] = new TileBrushCell(i, j, _cells[i][j].tile); } } } } _cells = newcells; Width = width; Height = height; }
public void Reset(int width, int height) { TileBrushCell[][] newcells = new TileBrushCell[width][]; for (int i = 0; i < width; i++) { newcells[i] = new TileBrushCell[height]; if (_cells != null && i < Width) // old width { for (int j = 0; j < height; j++) { if (j < Height) newcells[i][j] = new TileBrushCell(i, j, _cells[i][j].tile); } } } _cells = newcells; Width = width; Height = height; }