private TextureStack GetTexture(string name, long data, TextureTranslation translation = null, RotateFlipType rot = RotateFlipType.RotateNoneFlipNone) { string texturePath = null; if (texturesJson.ContainsKey(name)) { var texture = texturesJson[name]; if (texture.Subtextures.Count <= data || data < 0) { //Console.WriteLine("Index out of bounds during GetTexture for {0}", name); texturePath = texture.Subtextures.First().Path; } else { texturePath = texture.Subtextures[(int)data].Path; } } if (texturePath == null) { return(null); } return(new TextureStack(texturePath, translation, rot)); }
public TextureStack(string filename, TextureTranslation translation, RotateFlipType rotation) { Infos.Add(new TextureInfo(filename, translation, rotation)); }
public TextureInfo(string filename, TextureTranslation translation, RotateFlipType rotation) { Filename = filename; Translation = translation; Rotation = rotation; }