refactor: sprite sizing

pull/204/head
Allison Ryan 3 years ago
parent d7620256f8
commit 79b8b5c1bf

@ -113,9 +113,8 @@ class _AlienBumperSpriteGroupComponent
AlienBumperSpriteState.inactive: AlienBumperSpriteState.inactive:
Sprite(gameRef.images.fromCache(_offAssetPath)), Sprite(gameRef.images.fromCache(_offAssetPath)),
}; };
this.sprites = sprites; this.sprites = sprites;
size = sprites[AlienBumperSpriteState.active]!.originalSize / 10; size = sprites.entries.first.value.originalSize / 10;
current = AlienBumperSpriteState.active; current = AlienBumperSpriteState.active;
} }

@ -129,7 +129,7 @@ class _SparkyBumperSpriteGroupComponent
Sprite(gameRef.images.fromCache(_offAssetPath)), Sprite(gameRef.images.fromCache(_offAssetPath)),
}; };
this.sprites = sprites; this.sprites = sprites;
size = sprites[SparkyBumperSpriteState.active]!.originalSize / 10; size = sprites.entries.first.value.originalSize / 10;
current = SparkyBumperSpriteState.active; current = SparkyBumperSpriteState.active;
} }

Loading…
Cancel
Save