public static Vector2[] GetTexture(TextureSide textureSide) { return(new[] { new Vector2(0, TileRatio * 2), new Vector2(0, TileRatio * 3), new Vector2(TileRatio, TileRatio * 3), new Vector2(TileRatio, TileRatio * 2), }); }
private PointL CollateShift(TextureSide side) { return(side switch { TextureSide.Left => new PointL(1, 0, 0), TextureSide.Back => new PointL(0, 0, 1), TextureSide.Right => new PointL(-1, 0, 0), TextureSide.Front => new PointL(0, 0, -1), TextureSide.Top => new PointL(0, 1, 0), TextureSide.Bottom => new PointL(0, -1, 0), _ => throw new ArgumentOutOfRangeException() });
public static Vector2[] GetTexture(TextureSide textureSide) { switch (textureSide) { case TextureSide.Top: return(Top); case TextureSide.Side: return(Side); case TextureSide.Bottom: return(Bottom); default: throw new ArgumentOutOfRangeException(nameof(textureSide), textureSide, null); } }
public static Vector2[] GetTexture(TextureType textureType, TextureSide textureSide) { switch (textureType) { case TextureType.Grass: return(GrassBlock.GetTexture(textureSide)); case TextureType.Gravel: return(GravelBlock.GetTexture(textureSide)); case TextureType.Stone: return(StoneBlock.GetTexture(textureSide)); default: throw new ArgumentOutOfRangeException(nameof(textureType), textureType, null); } }
public static Vector2[] GetTexture(BiomeType biomeType, TextureType textureType, TextureSide textureSide) { switch (biomeType) { case BiomeType.Normal: return(NormalBiome.GetTexture(textureType, textureSide)); default: throw new ArgumentOutOfRangeException(nameof(biomeType), biomeType, null); } }
public static Vector2[] GetUVs(BiomeType biomeType, TextureType textureType, TextureSide textureSide) { return(Coordinates.GetTexture(biomeType, textureType, textureSide)); }
public TileTexture(BiomeType biomeType, TextureType textureType, TextureSide textureSide) { Biome = biomeType; Block = textureType; Side = textureSide; }