private void PaintCell(Vector3Int position, Tilemap tilemap, GridBrush.BrushCell cell) { if (cell.tile != null) { GridBrush.SetTilemapCell(tilemap, position, cell.tile, cell.matrix, cell.color); } }
private bool NotOverridingColor(GridBrush defaultGridBrush) { foreach (var cell in defaultGridBrush.cells) { TileBase tile = cell.tile; if (tile is Tile && ((tile as Tile).flags & TileFlags.LockColor) == 0) { return(true); } } return(false); }
private bool NotOverridingColor(GridBrush defaultGridBrush) { GridBrush.BrushCell[] cells = defaultGridBrush.cells; bool result; for (int i = 0; i < cells.Length; i++) { GridBrush.BrushCell brushCell = cells[i]; TileBase tile = brushCell.tile; if (tile is Tile && ((tile as Tile).flags & TileFlags.LockColor) == TileFlags.None) { result = true; return(result); } } result = false; return(result); }
private static int GetHash(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, GridBrush brush) { int num = 0; num = num * 33 + ((!(gridLayout != null)) ? 0 : gridLayout.GetHashCode()); num = num * 33 + ((!(brushTarget != null)) ? 0 : brushTarget.GetHashCode()); num = num * 33 + position.GetHashCode(); num = num * 33 + tool.GetHashCode(); return(num * 33 + ((!(brush != null)) ? 0 : brush.GetHashCode())); }
private static int GetHash(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, GridBrush brush) { int hash = 0; unchecked { hash = hash * 33 + (gridLayout != null ? gridLayout.GetHashCode() : 0); hash = hash * 33 + (brushTarget != null ? brushTarget.GetHashCode() : 0); hash = hash * 33 + position.GetHashCode(); hash = hash * 33 + tool.GetHashCode(); hash = hash * 33 + (brush != null ? brush.GetHashCode() : 0); } return(hash); }
private void EraseCell(Vector3Int position, Tilemap tilemap) { GridBrush.ClearTilemapCell(tilemap, position); }