// convenience for types that use the same texture on top and bottom (a lot of natural materials, for example) public TBSCVoxelSkin(TileTexture topBottomTexture, TileTexture sideTexture, TileTexture cornerTexture) { TopTexture = topBottomTexture; BottomTexture = topBottomTexture; SideTexture = sideTexture; CornerTexture = cornerTexture; }
public void AddTileTexture(TileTexture tile) { var t = tile.Texture; if (t.Width != t.Height) { Logger.Error(this, $"Can't add texture {t.Name} to atlas: Not square {t.Width}x{t.Height}"); return; } if (TilePixelWidth == -1) { TilePixelWidth = t.Width; } else if (TilePixelWidth != t.Width) { Logger.Error(this, $"Can't add texture {t.Name} to atlas: Width {t.Width} is not expected {TilePixelWidth}"); return; } _tiles.Add(t.Name, tile); }
public SingleVoxelSkin(TileTexture texture) { this.Texture = texture; }
public ColumnVoxelSkin(TileTexture top, TileTexture bottom, TileTexture side) { TopTexture = top; BottomTexture = bottom; SideTexture = side; }