public static GetSprites ( IReadOnlyFileSystem fileSystem, string filename, ISpriteLoader loaders, |
||
fileSystem | IReadOnlyFileSystem | |
filename | string | |
loaders | ISpriteLoader | |
sheetBuilder | ||
Résultat | OpenRA.Graphics.Sprite[] |
Sprite[] LoadSprite(string filename, List <Sprite[]> cache) { var sprite = SpriteLoader.GetSprites(fileSystem, filename, loaders, SheetBuilder); cache.Add(sprite); return(sprite); }
public SpriteCache(ISpriteLoader[] loaders, string[] exts, SheetBuilder sheetBuilder) { SheetBuilder = sheetBuilder; // Include extension-less version exts = exts.Append("").ToArray(); sprites = new Cache <string, Sprite[]>(filename => SpriteLoader.GetSprites(filename, exts, loaders, sheetBuilder)); }
public SpriteCache(ISpriteLoader[] loaders, SheetBuilder sheetBuilder) { SheetBuilder = sheetBuilder; sprites = new Cache <string, Sprite[]>(filename => SpriteLoader.GetSprites(filename, loaders, sheetBuilder)); }