loadJson static method
Future<AnimatedSprite>
loadJson(
- String name,
- JsonAssetCache jsonAssetCache,
- ImageAssetCache imageAssetCache
load animation from json asset and load frame images
Implementation
static Future<AnimatedSprite> loadJson(
String name,
JsonAssetCache jsonAssetCache,
ImageAssetCache imageAssetCache,
) async {
final jsonAsset = await jsonAssetCache.load(name);
return await AnimatedSprite.fromJson(jsonAsset).loadImages(imageAssetCache);
}