refactor: removed caching

pull/205/head
alestiago 3 years ago
parent 91f02455a1
commit 85468d6258

@ -76,9 +76,13 @@ class _SignPostSpriteComponent
final sprites = <_SignPostSpriteState, Sprite>{}; final sprites = <_SignPostSpriteState, Sprite>{};
this.sprites = sprites; this.sprites = sprites;
for (final spriteState in _SignPostSpriteState.values) { for (final spriteState in _SignPostSpriteState.values) {
sprites[spriteState] = Sprite( // TODO(allisonryan0002): Support caching
gameRef.images.fromCache(spriteState.path), // https://github.com/VGVentures/pinball/pull/204
); // sprites[spriteState] = Sprite(
// gameRef.images.fromCache(spriteState.path),
// );
sprites[spriteState] =
Sprite(await gameRef.images.load(spriteState.path));
} }
current = _SignPostSpriteState.inactive; current = _SignPostSpriteState.inactive;

@ -7,7 +7,7 @@ import 'package:pinball_components/pinball_components.dart';
import '../../helpers/helpers.dart'; import '../../helpers/helpers.dart';
// TODO(alisonryan): Refactor loading assets in test with // TODO(allisonryan0002): Refactor loading assets in test with
// https://github.com/VGVentures/pinball/pull/204 // https://github.com/VGVentures/pinball/pull/204
void main() { void main() {

Loading…
Cancel
Save