Sprite[] LoadSprite(string filename, List <Sprite[]> cache) { var sprite = SpriteLoader.GetSprites(fileSystem, filename, loaders, SheetBuilder); cache.Add(sprite); return(sprite); }
public FrameCache(IReadOnlyFileSystem fileSystem, ISpriteLoader[] loaders) { frames = new Cache <string, ISpriteFrame[]>(filename => SpriteLoader.GetFrames(fileSystem, filename, loaders)); }