Пример #1
0
        Sprite[] LoadSprite(string filename, List <Sprite[]> cache)
        {
            var sprite = SpriteLoader.GetSprites(fileSystem, filename, loaders, SheetBuilder);

            cache.Add(sprite);
            return(sprite);
        }
Пример #2
0
 public FrameCache(IReadOnlyFileSystem fileSystem, ISpriteLoader[] loaders)
 {
     frames = new Cache <string, ISpriteFrame[]>(filename => SpriteLoader.GetFrames(fileSystem, filename, loaders));
 }