refactor: oncomplete at plunger animations

pull/200/head
RuiAlonso 3 years ago
parent 2316dc3f64
commit 1721f628c5

@ -161,11 +161,17 @@ class _PlungerSpriteComponent extends SpriteAnimationComponent with HasGameRef {
amountPerRow: amountPerRow ~/ 2, amountPerRow: amountPerRow ~/ 2,
stepTime: 1 / 24, stepTime: 1 / 24,
textureSize: textureSize, textureSize: textureSize,
texturePosition: Vector2(0, 0), texturePosition: Vector2.zero(),
loop: false, loop: false,
), ),
); )..onComplete = () {
_releaseAnimation = _pullAnimation.reversed(); playing = false;
};
_releaseAnimation = _pullAnimation.reversed()
..onComplete = () {
playing = false;
};
animation = _pullAnimation; animation = _pullAnimation;
position = Vector2(1.87, 15.5); position = Vector2(1.87, 15.5);

Loading…
Cancel
Save