refactor: add rotation to multiball constructor

pull/235/head
RuiAlonso 3 years ago
parent b1cf524935
commit 51de4da0f1

@ -19,7 +19,8 @@ class Multiball extends Component {
position: position,
onAssetPath: onAssetPath,
offAssetPath: offAssetPath,
)..angle = rotation,
rotation: rotation,
),
],
);
@ -92,11 +93,13 @@ class MultiballSpriteGroupComponent
required Vector2 position,
required String onAssetPath,
required String offAssetPath,
required double rotation,
}) : _onAssetPath = onAssetPath,
_offAssetPath = offAssetPath,
super(
anchor: Anchor.center,
position: position,
angle: rotation,
);
final String _onAssetPath;

@ -58,7 +58,7 @@ void main() {
final multiball = Multiball.d();
await game.ensureAdd(multiball);
multiball.animate();
await multiball.animate();
await tester.pump();
expect(

Loading…
Cancel
Save