From 9fd264a18cc5bc8cc707819aca8a7959ccf841ed Mon Sep 17 00:00:00 2001 From: Rui Miguel Alonso Date: Tue, 19 Apr 2022 16:15:58 +0200 Subject: [PATCH] Update packages/pinball_components/lib/src/components/plunger.dart Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> --- .../pinball_components/lib/src/components/plunger.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/pinball_components/lib/src/components/plunger.dart b/packages/pinball_components/lib/src/components/plunger.dart index 1a2d4473..1a3c2a1c 100644 --- a/packages/pinball_components/lib/src/components/plunger.dart +++ b/packages/pinball_components/lib/src/components/plunger.dart @@ -133,7 +133,10 @@ class _PlungerSpriteAnimationGroupComponent extends SpriteAnimationGroupComponent<_PlungerAnimationState> with HasGameRef { _PlungerSpriteAnimationGroupComponent(Image spriteSheet) - : super(anchor: Anchor.center) { + : super( + anchor: Anchor.center, + position: Vector2(1.87, 14.9), + ) { const amountPerRow = 20; const amountPerColumn = 1; @@ -143,8 +146,6 @@ class _PlungerSpriteAnimationGroupComponent ); size = textureSize / 10; - position = Vector2(1.87, 14.9); - // TODO(ruimiguel): we only need plunger pull animation, and release is just // to reverse it, so we need to divide by 2 while we don't have only half of // the animation (but amountPerRow and amountPerColumn needs to be correct