Update packages/pinball_components/lib/src/components/plunger.dart

Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>
pull/200/head
Rui Miguel Alonso 3 years ago committed by GitHub
parent 20ee607034
commit 9fd264a18c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save