diff --git a/assets/images/components/background.png b/assets/images/components/background.png index 28cf5cbe..023814e2 100644 Binary files a/assets/images/components/background.png and b/assets/images/components/background.png differ diff --git a/lib/game/components/alien_zone.dart b/lib/game/components/alien_zone.dart index 3d8b75ae..1f9befba 100644 --- a/lib/game/components/alien_zone.dart +++ b/lib/game/components/alien_zone.dart @@ -25,9 +25,9 @@ class AlienZone extends Component with HasGameRef { gameRef.addContactCallback(_ControlledAlienBumperBallContactCallback()); final lowerBumper = ControlledAlienBumper.a() - ..initialPosition = Vector2(-32.52, 9.34); + ..initialPosition = Vector2(-32.52, -9.34); final upperBumper = ControlledAlienBumper.b() - ..initialPosition = Vector2(-22.89, 17.43); + ..initialPosition = Vector2(-22.89, -17.43); await addAll([ lowerBumper, diff --git a/lib/game/components/board.dart b/lib/game/components/board.dart index 41581cc3..a9a9451f 100644 --- a/lib/game/components/board.dart +++ b/lib/game/components/board.dart @@ -23,7 +23,7 @@ class Board extends Component { final dino = ChromeDino() ..initialPosition = Vector2( BoardDimensions.bounds.center.dx + 25, - BoardDimensions.bounds.center.dy + 10, + BoardDimensions.bounds.center.dy - 10, ); await addAll([ @@ -77,17 +77,17 @@ class _BottomGroupSide extends Component { final flipper = ControlledFlipper( side: _side, - )..initialPosition = Vector2((11.8 * direction) + centerXAdjustment, -43.6); + )..initialPosition = Vector2((11.8 * direction) + centerXAdjustment, 43.6); final baseboard = Baseboard(side: _side) ..initialPosition = Vector2( (25.58 * direction) + centerXAdjustment, - -28.69, + 28.69, ); final kicker = Kicker( side: _side, )..initialPosition = Vector2( (22.4 * direction) + centerXAdjustment, - -25, + 25, ); await addAll([flipper, baseboard, kicker]); diff --git a/lib/game/components/bonus_word.dart b/lib/game/components/bonus_word.dart index 3457e84c..f3b9743c 100644 --- a/lib/game/components/bonus_word.dart +++ b/lib/game/components/bonus_word.dart @@ -78,9 +78,9 @@ class BonusWord extends Component await super.onLoad(); final offsets = [ - Vector2(-12.92, -1.82), - Vector2(-8.33, 0.65), - Vector2(-2.88, 1.75), + Vector2(-12.92, 1.82), + Vector2(-8.33, -0.65), + Vector2(-2.88, -1.75), ]; offsets.addAll( offsets.reversed diff --git a/lib/game/components/controlled_ball.dart b/lib/game/components/controlled_ball.dart index 7a94f96b..8354605c 100644 --- a/lib/game/components/controlled_ball.dart +++ b/lib/game/components/controlled_ball.dart @@ -67,7 +67,7 @@ class BallController extends ComponentController await Future.delayed(const Duration(seconds: 1)); component ..resume() - ..boost(Vector2(200, -500)); + ..boost(Vector2(200, 500)); } @override diff --git a/lib/game/components/controlled_sparky_computer.dart b/lib/game/components/controlled_sparky_computer.dart index 699ebae2..10168e50 100644 --- a/lib/game/components/controlled_sparky_computer.dart +++ b/lib/game/components/controlled_sparky_computer.dart @@ -21,7 +21,7 @@ class ControlledSparkyComputer extends SparkyComputer void build(Forge2DGame _) { addContactCallback(SparkyTurboChargeSensorBallContactCallback()); final sparkyTurboChargeSensor = SparkyTurboChargeSensor() - ..initialPosition = Vector2(-13, 49.8); + ..initialPosition = Vector2(-13, -49.8); add(sparkyTurboChargeSensor); super.build(_); } diff --git a/lib/game/components/flutter_forest.dart b/lib/game/components/flutter_forest.dart index 76699ec9..88099ee4 100644 --- a/lib/game/components/flutter_forest.dart +++ b/lib/game/components/flutter_forest.dart @@ -26,17 +26,17 @@ class FlutterForest extends Component with Controls<_FlutterForestController> { @override Future onLoad() async { await super.onLoad(); - final signPost = FlutterSignPost()..initialPosition = Vector2(8.35, 58.3); + final signPost = FlutterSignPost()..initialPosition = Vector2(8.35, -58.3); final bigNest = _ControlledBigDashNestBumper( id: 'big_nest_bumper', - )..initialPosition = Vector2(18.55, 59.35); + )..initialPosition = Vector2(18.55, -59.35); final smallLeftNest = _ControlledSmallDashNestBumper.a( id: 'small_nest_bumper_a', - )..initialPosition = Vector2(8.95, 51.95); + )..initialPosition = Vector2(8.95, -51.95); final smallRightNest = _ControlledSmallDashNestBumper.b( id: 'small_nest_bumper_b', - )..initialPosition = Vector2(23.3, 46.75); + )..initialPosition = Vector2(23.3, -46.75); final dashAnimatronic = DashAnimatronic()..position = Vector2(20, -66); await addAll([ @@ -78,7 +78,7 @@ class _FlutterForestController extends ComponentController await Future.delayed(const Duration(milliseconds: 700)); await gameRef.add( ControlledBall.bonus(theme: gameRef.theme) - ..initialPosition = Vector2(17.2, 52.7), + ..initialPosition = Vector2(17.2, -52.7), ); } } diff --git a/lib/game/components/sparky_fire_zone.dart b/lib/game/components/sparky_fire_zone.dart index ee8da614..bf8ba883 100644 --- a/lib/game/components/sparky_fire_zone.dart +++ b/lib/game/components/sparky_fire_zone.dart @@ -25,11 +25,11 @@ class SparkyFireZone extends Component with HasGameRef { gameRef.addContactCallback(_ControlledSparkyBumperBallContactCallback()); final lowerLeftBumper = ControlledSparkyBumper.a() - ..initialPosition = Vector2(-23.15, 41.65); + ..initialPosition = Vector2(-23.15, -41.65); final upperLeftBumper = ControlledSparkyBumper.b() - ..initialPosition = Vector2(-21.25, 58.15); + ..initialPosition = Vector2(-21.25, -58.15); final rightBumper = ControlledSparkyBumper.c() - ..initialPosition = Vector2(-3.56, 53.051); + ..initialPosition = Vector2(-3.56, -53.051); await addAll([ lowerLeftBumper, diff --git a/lib/game/game_assets.dart b/lib/game/game_assets.dart index cce1e658..8f2fc171 100644 --- a/lib/game/game_assets.dart +++ b/lib/game/game_assets.dart @@ -15,10 +15,8 @@ extension PinballGameAssetsX on PinballGame { images.load(components.Assets.images.baseboard.right.keyName), images.load(components.Assets.images.kicker.left.keyName), images.load(components.Assets.images.kicker.right.keyName), - images.load(components.Assets.images.slingshot.leftUpper.keyName), - images.load(components.Assets.images.slingshot.leftLower.keyName), - images.load(components.Assets.images.slingshot.rightUpper.keyName), - images.load(components.Assets.images.slingshot.rightLower.keyName), + images.load(components.Assets.images.slingshot.upper.keyName), + images.load(components.Assets.images.slingshot.lower.keyName), images.load(components.Assets.images.launchRamp.ramp.keyName), images.load( components.Assets.images.launchRamp.foregroundRailing.keyName, diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index cad2eac5..0f15ace2 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -49,7 +49,7 @@ class PinballGame extends Forge2DGame unawaited(addFromBlueprint(ControlledSparkyComputer())); final plunger = ControlledPlunger(compressionDistance: 29) - ..initialPosition = Vector2(38, -19); + ..initialPosition = Vector2(38, 19); await add(plunger); unawaited(add(Board())); @@ -62,15 +62,11 @@ class PinballGame extends Forge2DGame unawaited( addFromBlueprint( Spaceship( - position: Vector2(-26.5, 28.5), + position: Vector2(-26.5, -28.5), ), ), ); - unawaited( - addFromBlueprint( - SpaceshipRail(), - ), - ); + unawaited(addFromBlueprint(SpaceshipRail())); controller.attachTo(plunger); await super.onLoad(); @@ -91,8 +87,8 @@ class PinballGame extends Forge2DGame await add( BonusWord( position: Vector2( - BoardDimensions.bounds.center.dx - 3.07, - BoardDimensions.bounds.center.dy - 2.4, + BoardDimensions.bounds.center.dx - 4.1, + BoardDimensions.bounds.center.dy + 1.8, ), ), ); @@ -130,7 +126,7 @@ class _GameBallsController extends ComponentController theme: gameRef.theme, )..initialPosition = Vector2( _plunger.body.position.x, - _plunger.body.position.y + Ball.size.y, + _plunger.body.position.y - Ball.size.y, ); component.add(ball); } diff --git a/packages/pinball_components/assets/images/slingshot/left_lower.png b/packages/pinball_components/assets/images/slingshot/left_lower.png deleted file mode 100644 index b44b58fb..00000000 Binary files a/packages/pinball_components/assets/images/slingshot/left_lower.png and /dev/null differ diff --git a/packages/pinball_components/assets/images/slingshot/left_upper.png b/packages/pinball_components/assets/images/slingshot/left_upper.png deleted file mode 100644 index c74267ca..00000000 Binary files a/packages/pinball_components/assets/images/slingshot/left_upper.png and /dev/null differ diff --git a/packages/pinball_components/assets/images/slingshot/right_lower.png b/packages/pinball_components/assets/images/slingshot/lower.png similarity index 100% rename from packages/pinball_components/assets/images/slingshot/right_lower.png rename to packages/pinball_components/assets/images/slingshot/lower.png diff --git a/packages/pinball_components/assets/images/slingshot/right_upper.png b/packages/pinball_components/assets/images/slingshot/upper.png similarity index 100% rename from packages/pinball_components/assets/images/slingshot/right_upper.png rename to packages/pinball_components/assets/images/slingshot/upper.png diff --git a/packages/pinball_components/lib/gen/assets.gen.dart b/packages/pinball_components/lib/gen/assets.gen.dart index 1a4c9861..df66a9a8 100644 --- a/packages/pinball_components/lib/gen/assets.gen.dart +++ b/packages/pinball_components/lib/gen/assets.gen.dart @@ -192,21 +192,13 @@ class $AssetsImagesPlungerGen { class $AssetsImagesSlingshotGen { const $AssetsImagesSlingshotGen(); - /// File path: assets/images/slingshot/left_lower.png - AssetGenImage get leftLower => - const AssetGenImage('assets/images/slingshot/left_lower.png'); + /// File path: assets/images/slingshot/lower.png + AssetGenImage get lower => + const AssetGenImage('assets/images/slingshot/lower.png'); - /// File path: assets/images/slingshot/left_upper.png - AssetGenImage get leftUpper => - const AssetGenImage('assets/images/slingshot/left_upper.png'); - - /// File path: assets/images/slingshot/right_lower.png - AssetGenImage get rightLower => - const AssetGenImage('assets/images/slingshot/right_lower.png'); - - /// File path: assets/images/slingshot/right_upper.png - AssetGenImage get rightUpper => - const AssetGenImage('assets/images/slingshot/right_upper.png'); + /// File path: assets/images/slingshot/upper.png + AssetGenImage get upper => + const AssetGenImage('assets/images/slingshot/upper.png'); } class $AssetsImagesSpaceshipGen { diff --git a/packages/pinball_components/lib/src/components/alien_bumper.dart b/packages/pinball_components/lib/src/components/alien_bumper.dart index 75b0560d..24c9e0fc 100644 --- a/packages/pinball_components/lib/src/components/alien_bumper.dart +++ b/packages/pinball_components/lib/src/components/alien_bumper.dart @@ -73,7 +73,7 @@ class AlienBumper extends BodyComponent with InitialPosition { center: Vector2.zero(), majorRadius: _majorRadius, minorRadius: _minorRadius, - )..rotate(15.9 * math.pi / 180); + )..rotate(1.29); final fixtureDef = FixtureDef(shape) ..friction = 0 ..restitution = 4; diff --git a/packages/pinball_components/lib/src/components/ball.dart b/packages/pinball_components/lib/src/components/ball.dart index fcd6830d..21f44cba 100644 --- a/packages/pinball_components/lib/src/components/ball.dart +++ b/packages/pinball_components/lib/src/components/ball.dart @@ -99,8 +99,8 @@ class Ball extends BodyComponent final direction = body.linearVelocity.normalized(); final effect = FireEffect( burstPower: _boostTimer, - direction: -direction, - position: Vector2(body.position.x, -body.position.y), + direction: direction, + position: Vector2(body.position.x, body.position.y), priority: priority - 1, ); @@ -117,10 +117,10 @@ class Ball extends BodyComponent } void _rescale() { - final boardHeight = BoardDimensions.size.y; + final boardHeight = BoardDimensions.bounds.height; const maxShrinkAmount = BoardDimensions.perspectiveShrinkFactor; - final adjustedYPosition = body.position.y + (boardHeight / 2); + final adjustedYPosition = -body.position.y + (boardHeight / 2); final scaleFactor = ((boardHeight - adjustedYPosition) / BoardDimensions.shrinkAdjustedHeight) + diff --git a/packages/pinball_components/lib/src/components/baseboard.dart b/packages/pinball_components/lib/src/components/baseboard.dart index 56b7c978..df602f65 100644 --- a/packages/pinball_components/lib/src/components/baseboard.dart +++ b/packages/pinball_components/lib/src/components/baseboard.dart @@ -19,37 +19,37 @@ class Baseboard extends BodyComponent with InitialPosition { List _createFixtureDefs() { final fixturesDef = []; final direction = _side.direction; - final arcsAngle = -1.11 * direction; - const arcsRotation = math.pi / 2.08; + const arcsAngle = 1.11; + final arcsRotation = (_side.isLeft) ? -2.7 : -1.6; final pegBumperShape = CircleShape()..radius = 0.7; - pegBumperShape.position.setValues(11.11 * direction, 7.15); + pegBumperShape.position.setValues(11.11 * direction, -7.15); final pegBumperFixtureDef = FixtureDef(pegBumperShape); fixturesDef.add(pegBumperFixtureDef); final topCircleShape = CircleShape()..radius = 0.7; - topCircleShape.position.setValues(9.71 * direction, 4.95); + topCircleShape.position.setValues(9.71 * direction, -4.95); final topCircleFixtureDef = FixtureDef(topCircleShape); fixturesDef.add(topCircleFixtureDef); final innerEdgeShape = EdgeShape() ..set( - Vector2(9.01 * direction, 5.35), - Vector2(5.29 * direction, -0.95), + Vector2(9.01 * direction, -5.35), + Vector2(5.29 * direction, 0.95), ); final innerEdgeShapeFixtureDef = FixtureDef(innerEdgeShape); fixturesDef.add(innerEdgeShapeFixtureDef); final outerEdgeShape = EdgeShape() ..set( - Vector2(10.41 * direction, 4.75), - Vector2(3.79 * direction, -5.95), + Vector2(10.41 * direction, -4.75), + Vector2(3.79 * direction, 5.95), ); final outerEdgeShapeFixtureDef = FixtureDef(outerEdgeShape); fixturesDef.add(outerEdgeShapeFixtureDef); final upperArcShape = ArcShape( - center: Vector2(0.09 * direction, 2.15), + center: Vector2(0.09 * direction, -2.15), arcRadius: 6.1, angle: arcsAngle, rotation: arcsRotation, @@ -58,7 +58,7 @@ class Baseboard extends BodyComponent with InitialPosition { fixturesDef.add(upperArcFixtureDef); final lowerArcShape = ArcShape( - center: Vector2(0.09 * direction, -3.35), + center: Vector2(0.09 * direction, 3.35), arcRadius: 4.5, angle: arcsAngle, rotation: arcsRotation, @@ -70,7 +70,7 @@ class Baseboard extends BodyComponent with InitialPosition { ..setAsBox( 6.8, 2, - Vector2(-6.3 * direction, -5.85), + Vector2(-6.3 * direction, 5.85), 0, ); final bottomRectangleFixtureDef = FixtureDef(bottomRectangle); @@ -92,7 +92,7 @@ class Baseboard extends BodyComponent with InitialPosition { final bodyDef = BodyDef() ..position = initialPosition - ..angle = _side.isLeft ? -angle : angle; + ..angle = _side.isLeft ? angle : -angle; final body = world.createBody(bodyDef); _createFixtureDefs().forEach(body.createFixture); diff --git a/packages/pinball_components/lib/src/components/board_dimensions.dart b/packages/pinball_components/lib/src/components/board_dimensions.dart index b4db8c3c..83e3e29f 100644 --- a/packages/pinball_components/lib/src/components/board_dimensions.dart +++ b/packages/pinball_components/lib/src/components/board_dimensions.dart @@ -14,7 +14,7 @@ class BoardDimensions { static final bounds = Rect.fromCenter( center: Offset.zero, width: size.x, - height: -size.y, + height: size.y, ); /// 3D perspective angle of the board in radians. diff --git a/packages/pinball_components/lib/src/components/boundaries.dart b/packages/pinball_components/lib/src/components/boundaries.dart index 16c0f7b7..edbda8e1 100644 --- a/packages/pinball_components/lib/src/components/boundaries.dart +++ b/packages/pinball_components/lib/src/components/boundaries.dart @@ -30,9 +30,9 @@ class _BottomBoundary extends BodyComponent with InitialPosition { final bottomLeftCurve = BezierCurveShape( controlPoints: [ - Vector2(-43.9, -41.8), - Vector2(-35.7, -43), - Vector2(-19.9, -51), + Vector2(-43.9, 41.8), + Vector2(-35.7, 43), + Vector2(-19.9, 51), ], ); final bottomLeftCurveFixtureDef = FixtureDef(bottomLeftCurve); @@ -40,9 +40,9 @@ class _BottomBoundary extends BodyComponent with InitialPosition { final bottomRightCurve = BezierCurveShape( controlPoints: [ - Vector2(31.8, -44.8), - Vector2(21.95, -47.7), - Vector2(12.3, -52.1), + Vector2(31.8, 44.8), + Vector2(21.95, 47.7), + Vector2(12.3, 52.1), ], ); final bottomRightCurveFixtureDef = FixtureDef(bottomRightCurve); @@ -95,17 +95,17 @@ class _OuterBoundary extends BodyComponent with InitialPosition { final topWall = EdgeShape() ..set( - Vector2(3.6, 70.2), - Vector2(-14.1, 70.2), + Vector2(3.6, -70.2), + Vector2(-14.1, -70.2), ); final topWallFixtureDef = FixtureDef(topWall); fixturesDefs.add(topWallFixtureDef); final topLeftCurve = BezierCurveShape( controlPoints: [ - Vector2(-32.3, 57.2), - Vector2(-31.5, 69.9), - Vector2(-14.1, 70.2), + Vector2(-32.3, -57.2), + Vector2(-31.5, -69.9), + Vector2(-14.1, -70.2), ], ); final topLeftCurveFixtureDef = FixtureDef(topLeftCurve); @@ -113,8 +113,8 @@ class _OuterBoundary extends BodyComponent with InitialPosition { final leftWall = EdgeShape() ..set( - Vector2(-32.3, 57.2), - Vector2(-43.9, -41.8), + Vector2(-32.3, -57.2), + Vector2(-43.9, 41.8), ); final leftWallFixtureDef = FixtureDef(leftWall); fixturesDefs.add(leftWallFixtureDef); diff --git a/packages/pinball_components/lib/src/components/dash_nest_bumper.dart b/packages/pinball_components/lib/src/components/dash_nest_bumper.dart index cec5b42a..9cd242d0 100644 --- a/packages/pinball_components/lib/src/components/dash_nest_bumper.dart +++ b/packages/pinball_components/lib/src/components/dash_nest_bumper.dart @@ -77,7 +77,7 @@ class BigDashNestBumper extends DashNestBumper { center: Vector2.zero(), majorRadius: 5.1, minorRadius: 3.75, - )..rotate(math.pi / 2.1); + )..rotate(math.pi / 1.9); final fixtureDef = FixtureDef(shape); final bodyDef = BodyDef() diff --git a/packages/pinball_components/lib/src/components/dino_walls.dart b/packages/pinball_components/lib/src/components/dino_walls.dart index dc5b7a26..96f5a56c 100644 --- a/packages/pinball_components/lib/src/components/dino_walls.dart +++ b/packages/pinball_components/lib/src/components/dino_walls.dart @@ -35,8 +35,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition { final topStraightShape = EdgeShape() ..set( - Vector2(29.5, 35.1), - Vector2(28.4, 35.1), + Vector2(28.4, -35.1), + Vector2(29.5, -35.1), ); final topStraightFixtureDef = FixtureDef(topStraightShape); fixturesDef.add(topStraightFixtureDef); @@ -44,8 +44,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition { final topCurveShape = BezierCurveShape( controlPoints: [ topStraightShape.vertex1, - Vector2(17.4, 26.38), - Vector2(25.5, 20.7), + Vector2(17.4, -26.38), + Vector2(25.5, -20.7), ], ); fixturesDef.add(FixtureDef(topCurveShape)); @@ -53,8 +53,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition { final middleCurveShape = BezierCurveShape( controlPoints: [ topCurveShape.vertices.last, - Vector2(27.8, 20.1), - Vector2(26.8, 19.5), + Vector2(27.8, -20.1), + Vector2(26.8, -19.5), ], ); fixturesDef.add(FixtureDef(middleCurveShape)); @@ -62,8 +62,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition { final bottomCurveShape = BezierCurveShape( controlPoints: [ middleCurveShape.vertices.last, - Vector2(21.15, 16), - Vector2(25.6, 15.2), + Vector2(21.15, -16), + Vector2(25.6, -15.2), ], ); fixturesDef.add(FixtureDef(bottomCurveShape)); @@ -71,7 +71,7 @@ class _DinoTopWall extends BodyComponent with InitialPosition { final bottomStraightShape = EdgeShape() ..set( bottomCurveShape.vertices.last, - Vector2(31, 14.5), + Vector2(31, -14.5), ); final bottomStraightFixtureDef = FixtureDef(bottomStraightShape); fixturesDef.add(bottomStraightFixtureDef); @@ -130,8 +130,8 @@ class _DinoBottomWall extends BodyComponent with InitialPosition { final fixturesDef = []; final topStraightControlPoints = [ - Vector2(32.4, 8.3), - Vector2(25, 7.7), + Vector2(32.4, -8.3), + Vector2(25, -7.7), ]; final topStraightShape = EdgeShape() ..set( @@ -143,8 +143,8 @@ class _DinoBottomWall extends BodyComponent with InitialPosition { final topLeftCurveControlPoints = [ topStraightControlPoints.last, - Vector2(21.8, 7), - Vector2(29.5, -13.8), + Vector2(21.8, -7), + Vector2(29.5, 13.8), ]; final topLeftCurveShape = BezierCurveShape( controlPoints: topLeftCurveControlPoints, @@ -153,7 +153,7 @@ class _DinoBottomWall extends BodyComponent with InitialPosition { final bottomLeftStraightControlPoints = [ topLeftCurveControlPoints.last, - Vector2(31.8, -44.1), + Vector2(31.8, 44.1), ]; final bottomLeftStraightShape = EdgeShape() ..set( @@ -165,7 +165,7 @@ class _DinoBottomWall extends BodyComponent with InitialPosition { final bottomStraightControlPoints = [ bottomLeftStraightControlPoints.last, - Vector2(37.8, -44.1), + Vector2(37.8, 44.1), ]; final bottomStraightShape = EdgeShape() ..set( diff --git a/packages/pinball_components/lib/src/components/fire_effect.dart b/packages/pinball_components/lib/src/components/fire_effect.dart index cf8c3707..14639527 100644 --- a/packages/pinball_components/lib/src/components/fire_effect.dart +++ b/packages/pinball_components/lib/src/components/fire_effect.dart @@ -73,7 +73,7 @@ class FireEffect extends ParticleSystemComponent { spreadTween.transform(random.nextDouble()), spreadTween.transform(random.nextDouble()), ); - final finalDirection = Vector2(direction.x, -direction.y) + spread; + final finalDirection = Vector2(direction.x, direction.y) + spread; final speed = finalDirection * (burstPower * 20); return AcceleratedParticle( diff --git a/packages/pinball_components/lib/src/components/flipper.dart b/packages/pinball_components/lib/src/components/flipper.dart index b0914917..ebe468b3 100644 --- a/packages/pinball_components/lib/src/components/flipper.dart +++ b/packages/pinball_components/lib/src/components/flipper.dart @@ -32,13 +32,13 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition { /// Applies downward linear velocity to the [Flipper], moving it to its /// resting position. void moveDown() { - body.linearVelocity = Vector2(0, -_speed); + body.linearVelocity = Vector2(0, _speed); } /// Applies upward linear velocity to the [Flipper], moving it to its highest /// position. void moveUp() { - body.linearVelocity = Vector2(0, _speed); + body.linearVelocity = Vector2(0, -_speed); } /// Anchors the [Flipper] to the [RevoluteJoint] that controls its arc motion. @@ -161,7 +161,7 @@ class _FlipperAnchor extends JointAnchor { initialPosition = Vector2( (Flipper.size.x * flipper.side.direction) / 2 - (1.65 * flipper.side.direction), - 0.15, + -0.15, ); } } @@ -209,8 +209,8 @@ class _FlipperJoint extends RevoluteJoint { void lock() { const angle = _halfSweepingAngle; setLimits( - -angle * side.direction, - -angle * side.direction, + angle * side.direction, + angle * side.direction, ); } diff --git a/packages/pinball_components/lib/src/components/kicker.dart b/packages/pinball_components/lib/src/components/kicker.dart index de009595..f70de757 100644 --- a/packages/pinball_components/lib/src/components/kicker.dart +++ b/packages/pinball_components/lib/src/components/kicker.dart @@ -34,14 +34,14 @@ class Kicker extends BodyComponent with InitialPosition { const quarterPi = math.pi / 4; final upperCircle = CircleShape()..radius = 1.6; - upperCircle.position.setValues(0, -upperCircle.radius / 2); + upperCircle.position.setValues(0, upperCircle.radius / 2); final upperCircleFixtureDef = FixtureDef(upperCircle)..friction = 0; fixturesDefs.add(upperCircleFixtureDef); final lowerCircle = CircleShape()..radius = 1.6; lowerCircle.position.setValues( size.x * -direction, - -size.y - 0.8, + size.y + 0.8, ); final lowerCircleFixtureDef = FixtureDef(lowerCircle)..friction = 0; fixturesDefs.add(lowerCircleFixtureDef); @@ -53,7 +53,7 @@ class Kicker extends BodyComponent with InitialPosition { upperCircle.radius * direction, 0, ), - Vector2(2.5 * direction, -size.y + 2), + Vector2(2.5 * direction, size.y - 2), ); final wallFacingLineFixtureDef = FixtureDef(wallFacingEdge)..friction = 0; fixturesDefs.add(wallFacingLineFixtureDef); @@ -64,7 +64,7 @@ class Kicker extends BodyComponent with InitialPosition { lowerCircle.position + Vector2( lowerCircle.radius * math.cos(quarterPi) * direction, - -lowerCircle.radius * math.sin(quarterPi), + lowerCircle.radius * math.sin(quarterPi), ), ); final bottomLineFixtureDef = FixtureDef(bottomEdge)..friction = 0; @@ -75,12 +75,12 @@ class Kicker extends BodyComponent with InitialPosition { upperCircle.position + Vector2( upperCircle.radius * math.cos(quarterPi) * -direction, - upperCircle.radius * math.sin(quarterPi), + -upperCircle.radius * math.sin(quarterPi), ), lowerCircle.position + Vector2( lowerCircle.radius * math.cos(quarterPi) * -direction, - lowerCircle.radius * math.sin(quarterPi), + -lowerCircle.radius * math.sin(quarterPi), ), ); @@ -97,7 +97,7 @@ class Kicker extends BodyComponent with InitialPosition { lowerCircle.position + Vector2( lowerCircle.radius * math.cos(quarterPi) * -direction, - -lowerCircle.radius * math.sin(quarterPi), + lowerCircle.radius * math.sin(quarterPi), ), wallFacingEdge.vertex2, ], diff --git a/packages/pinball_components/lib/src/components/launch_ramp.dart b/packages/pinball_components/lib/src/components/launch_ramp.dart index 02ac742a..bcafd114 100644 --- a/packages/pinball_components/lib/src/components/launch_ramp.dart +++ b/packages/pinball_components/lib/src/components/launch_ramp.dart @@ -23,7 +23,7 @@ class LaunchRamp extends Forge2DBlueprint { ..layer = Layer.launcher; final launchRampExit = _LaunchRampExit(rotation: math.pi / 2) - ..initialPosition = Vector2(1.8, 34.2) + ..initialPosition = Vector2(1.8, -34.2) ..layer = Layer.opening ..renderBody = false; @@ -52,50 +52,50 @@ class _LaunchRampBase extends BodyComponent with InitialPosition, Layered { final rightStraightShape = EdgeShape() ..set( - Vector2(31.4, 61.4), - Vector2(46.5, -68.4), + Vector2(31.4, -61.4), + Vector2(46.5, 68.4), ); final rightStraightFixtureDef = FixtureDef(rightStraightShape); fixturesDef.add(rightStraightFixtureDef); final leftStraightShape = EdgeShape() ..set( - Vector2(27.8, 61.4), - Vector2(41.5, -68.4), + Vector2(27.8, -61.4), + Vector2(41.5, 68.4), ); final leftStraightFixtureDef = FixtureDef(leftStraightShape); fixturesDef.add(leftStraightFixtureDef); final topCurveShape = ArcShape( - center: Vector2(20.5, 61.1), + center: Vector2(20.5, -61.1), arcRadius: 11, angle: 1.6, - rotation: -1.65, + rotation: 0.1, ); final topCurveFixtureDef = FixtureDef(topCurveShape); fixturesDef.add(topCurveFixtureDef); final bottomCurveShape = ArcShape( - center: Vector2(19.3, 60.3), + center: Vector2(19.3, -60.3), arcRadius: 8.5, angle: 1.48, - rotation: -1.58, + rotation: 0.1, ); final bottomCurveFixtureDef = FixtureDef(bottomCurveShape); fixturesDef.add(bottomCurveFixtureDef); final topStraightShape = EdgeShape() ..set( - Vector2(3.7, 70.1), - Vector2(19.1, 72.1), + Vector2(3.7, -70.1), + Vector2(19.1, -72.1), ); final topStraightFixtureDef = FixtureDef(topStraightShape); fixturesDef.add(topStraightFixtureDef); final bottomStraightShape = EdgeShape() ..set( - Vector2(3.7, 66.9), - Vector2(19.1, 68.8), + Vector2(3.7, -66.9), + Vector2(19.1, -68.8), ); final bottomStraightFixtureDef = FixtureDef(bottomStraightShape); fixturesDef.add(bottomStraightFixtureDef); @@ -158,25 +158,25 @@ class _LaunchRampForegroundRailing extends BodyComponent final rightStraightShape = EdgeShape() ..set( - Vector2(27.6, 57.9), - Vector2(30, 35.1), + Vector2(27.6, -57.9), + Vector2(30, -35.1), ); final rightStraightFixtureDef = FixtureDef(rightStraightShape); fixturesDef.add(rightStraightFixtureDef); final curveShape = ArcShape( - center: Vector2(20.1, 59.3), + center: Vector2(20.1, -59.3), arcRadius: 7.5, angle: 1.8, - rotation: -1.63, + rotation: -0.13, ); final curveFixtureDef = FixtureDef(curveShape); fixturesDef.add(curveFixtureDef); final topStraightShape = EdgeShape() ..set( - Vector2(3.7, 66.8), - Vector2(19.7, 66.8), + Vector2(3.7, -66.8), + Vector2(19.7, -66.8), ); final topStraightFixtureDef = FixtureDef(topStraightShape); fixturesDef.add(topStraightFixtureDef); diff --git a/packages/pinball_components/lib/src/components/plunger.dart b/packages/pinball_components/lib/src/components/plunger.dart index 0ea3ebda..60fbd3c4 100644 --- a/packages/pinball_components/lib/src/components/plunger.dart +++ b/packages/pinball_components/lib/src/components/plunger.dart @@ -42,7 +42,7 @@ class Plunger extends BodyComponent with InitialPosition { /// Set a constant downward velocity on the [Plunger]. void pull() { - body.linearVelocity = Vector2(0, -7); + body.linearVelocity = Vector2(0, 7); } /// Set an upward velocity on the [Plunger]. @@ -105,7 +105,7 @@ class PlungerAnchor extends JointAnchor { }) { initialPosition = Vector2( 0, - -plunger.compressionDistance, + plunger.compressionDistance, ); } } diff --git a/packages/pinball_components/lib/src/components/ramp_opening.dart b/packages/pinball_components/lib/src/components/ramp_opening.dart index a76c0d9e..92f1ff69 100644 --- a/packages/pinball_components/lib/src/components/ramp_opening.dart +++ b/packages/pinball_components/lib/src/components/ramp_opening.dart @@ -112,9 +112,9 @@ class RampOpeningBallContactCallback // now doesn't work position.y comparison final isBallOutsideOpening = (opening.orientation == RampOrientation.down && - ball.body.linearVelocity.y < 0) || + ball.body.linearVelocity.y > 0) || (opening.orientation == RampOrientation.up && - ball.body.linearVelocity.y > 0); + ball.body.linearVelocity.y < 0); if (isBallOutsideOpening) { ball diff --git a/packages/pinball_components/lib/src/components/slingshot.dart b/packages/pinball_components/lib/src/components/slingshot.dart index 0ebe13ce..92cca192 100644 --- a/packages/pinball_components/lib/src/components/slingshot.dart +++ b/packages/pinball_components/lib/src/components/slingshot.dart @@ -7,41 +7,27 @@ import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:pinball_components/pinball_components.dart'; /// {@template slingshots} -/// A [Blueprint] which creates the left and right pairs of [Slingshot]s. +/// A [Blueprint] which creates the pair of [Slingshot]s on the right side of +/// the board. /// {@endtemplate} class Slingshots extends Forge2DBlueprint { @override void build(_) { - // TODO(allisonryan0002): use radians values instead of converting degrees. - final leftUpperSlingshot = Slingshot( - length: 5.66, - angle: -1.5 * (math.pi / 180), - spritePath: Assets.images.slingshot.leftUpper.keyName, - )..initialPosition = Vector2(-29, 1.5); - - final leftLowerSlingshot = Slingshot( - length: 3.54, - angle: -29.1 * (math.pi / 180), - spritePath: Assets.images.slingshot.leftLower.keyName, - )..initialPosition = Vector2(-31, -6.2); - - final rightUpperSlingshot = Slingshot( + final upperSlingshot = Slingshot( length: 5.64, - angle: 1 * (math.pi / 180), - spritePath: Assets.images.slingshot.rightUpper.keyName, - )..initialPosition = Vector2(22.3, 1.58); + angle: -0.017, + spritePath: Assets.images.slingshot.upper.keyName, + )..initialPosition = Vector2(22.3, -1.58); - final rightLowerSlingshot = Slingshot( + final lowerSlingshot = Slingshot( length: 3.46, - angle: 26.8 * (math.pi / 180), - spritePath: Assets.images.slingshot.rightLower.keyName, - )..initialPosition = Vector2(24.7, -6.2); + angle: -0.468, + spritePath: Assets.images.slingshot.lower.keyName, + )..initialPosition = Vector2(24.7, 6.2); addAll([ - leftUpperSlingshot, - leftLowerSlingshot, - rightUpperSlingshot, - rightLowerSlingshot, + upperSlingshot, + lowerSlingshot, ]); } } @@ -71,12 +57,12 @@ class Slingshot extends BodyComponent with InitialPosition { const circleRadius = 1.55; final topCircleShape = CircleShape()..radius = circleRadius; - topCircleShape.position.setValues(0, _length / 2); + topCircleShape.position.setValues(0, -_length / 2); final topCircleFixtureDef = FixtureDef(topCircleShape)..friction = 0; fixturesDef.add(topCircleFixtureDef); final bottomCircleShape = CircleShape()..radius = circleRadius; - bottomCircleShape.position.setValues(0, -_length / 2); + bottomCircleShape.position.setValues(0, _length / 2); final bottomCircleFixtureDef = FixtureDef(bottomCircleShape)..friction = 0; fixturesDef.add(bottomCircleFixtureDef); @@ -131,7 +117,7 @@ class Slingshot extends BodyComponent with InitialPosition { sprite: sprite, size: sprite.originalSize / 10, anchor: Anchor.center, - angle: _angle, + angle: -_angle, ), ); } diff --git a/packages/pinball_components/lib/src/components/spaceship.dart b/packages/pinball_components/lib/src/components/spaceship.dart index 2cf37a13..b48bed4d 100644 --- a/packages/pinball_components/lib/src/components/spaceship.dart +++ b/packages/pinball_components/lib/src/components/spaceship.dart @@ -35,8 +35,8 @@ class Spaceship extends Forge2DBlueprint { SpaceshipHole( outsideLayer: Layer.spaceshipExitRail, outsidePriority: Ball.spaceshipRailPriority, - )..initialPosition = position - Vector2(5.2, 4.8), - SpaceshipHole()..initialPosition = position - Vector2(-7.2, 0.8), + )..initialPosition = position - Vector2(5.2, -4.8), + SpaceshipHole()..initialPosition = position - Vector2(-7.2, -0.8), SpaceshipWall()..initialPosition = position, ]); } @@ -197,10 +197,10 @@ class SpaceshipHole extends RampOpening { @override Shape get shape { return ArcShape( - center: Vector2(0, 3.2), + center: Vector2(0, -3.2), arcRadius: 5, angle: 1, - rotation: 60 * pi / 180, + rotation: -2, ); } } @@ -251,7 +251,7 @@ class SpaceshipWall extends BodyComponent with InitialPosition, Layered { final bodyDef = BodyDef() ..userData = this ..position = initialPosition - ..angle = 90 * pi / 172 + ..angle = -1.7 ..type = BodyType.static; return world.createBody(bodyDef) diff --git a/packages/pinball_components/lib/src/components/spaceship_rail.dart b/packages/pinball_components/lib/src/components/spaceship_rail.dart index 45c769a1..d9d6bc09 100644 --- a/packages/pinball_components/lib/src/components/spaceship_rail.dart +++ b/packages/pinball_components/lib/src/components/spaceship_rail.dart @@ -23,9 +23,9 @@ class SpaceshipRail extends Forge2DBlueprint { final railRamp = _SpaceshipRailRamp(); final railEnd = SpaceshipRailExit(); final topBase = _SpaceshipRailBase(radius: 0.55) - ..initialPosition = Vector2(-26.15, 18.65); + ..initialPosition = Vector2(-26.15, -18.65); final bottomBase = _SpaceshipRailBase(radius: 0.8) - ..initialPosition = Vector2(-25.5, -12.9); + ..initialPosition = Vector2(-25.5, 12.9); final railForeground = _SpaceshipRailForeground(); addAll([ @@ -51,19 +51,19 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final fixturesDefs = []; final topArcShape = ArcShape( - center: Vector2(-35.5, 30.9), + center: Vector2(-35.5, -30.9), arcRadius: 2.5, angle: math.pi, - rotation: 2.9, + rotation: 0.2, ); final topArcFixtureDef = FixtureDef(topArcShape); fixturesDefs.add(topArcFixtureDef); final topLeftCurveShape = BezierCurveShape( controlPoints: [ - Vector2(-37.9, 30.4), - Vector2(-38, 23.9), - Vector2(-30.93, 18.2), + Vector2(-37.9, -30.4), + Vector2(-38, -23.9), + Vector2(-30.93, -18.2), ], ); final topLeftCurveFixtureDef = FixtureDef(topLeftCurveShape); @@ -72,8 +72,8 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final middleLeftCurveShape = BezierCurveShape( controlPoints: [ topLeftCurveShape.vertices.last, - Vector2(-22.6, 10.3), - Vector2(-30, 0.2), + Vector2(-22.6, -10.3), + Vector2(-30, -0.2), ], ); final middleLeftCurveFixtureDef = FixtureDef(middleLeftCurveShape); @@ -82,8 +82,8 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final bottomLeftCurveShape = BezierCurveShape( controlPoints: [ middleLeftCurveShape.vertices.last, - Vector2(-36, -8.6), - Vector2(-32.04, -18.3), + Vector2(-36, 8.6), + Vector2(-32.04, 18.3), ], ); final bottomLeftCurveFixtureDef = FixtureDef(bottomLeftCurveShape); @@ -91,8 +91,8 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final topRightStraightShape = EdgeShape() ..set( - Vector2(-33, 31.3), - Vector2(-27.2, 21.3), + Vector2(-33, -31.3), + Vector2(-27.2, -21.3), ); final topRightStraightFixtureDef = FixtureDef(topRightStraightShape); fixturesDefs.add(topRightStraightFixtureDef); @@ -100,8 +100,8 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final middleRightCurveShape = BezierCurveShape( controlPoints: [ topRightStraightShape.vertex1, - Vector2(-16.5, 11.4), - Vector2(-25.29, -1.7), + Vector2(-16.5, -11.4), + Vector2(-25.29, 1.7), ], ); final middleRightCurveFixtureDef = FixtureDef(middleRightCurveShape); @@ -110,8 +110,8 @@ class _SpaceshipRailRamp extends BodyComponent with InitialPosition, Layered { final bottomRightCurveShape = BezierCurveShape( controlPoints: [ middleRightCurveShape.vertices.last, - Vector2(-29.91, -8.5), - Vector2(-26.8, -15.7), + Vector2(-29.91, 8.5), + Vector2(-26.8, 15.7), ], ); final bottomRightCurveFixtureDef = FixtureDef(bottomRightCurveShape); @@ -219,10 +219,10 @@ class SpaceshipRailExit extends RampOpening { @override Shape get shape { return ArcShape( - center: Vector2(-29, -19), + center: Vector2(-29, 19), arcRadius: 2.5, angle: math.pi * 0.4, - rotation: 0.26, + rotation: -1.4, ); } } diff --git a/packages/pinball_components/lib/src/components/spaceship_ramp.dart b/packages/pinball_components/lib/src/components/spaceship_ramp.dart index 1e0125b6..f7477fe9 100644 --- a/packages/pinball_components/lib/src/components/spaceship_ramp.dart +++ b/packages/pinball_components/lib/src/components/spaceship_ramp.dart @@ -25,14 +25,14 @@ class SpaceshipRamp extends Forge2DBlueprint { outsidePriority: 1, rotation: math.pi, ) - ..initialPosition = Vector2(1.7, 19.8) + ..initialPosition = Vector2(1.7, -19.8) ..layer = Layer.opening; final leftOpening = _SpaceshipRampOpening( outsideLayer: Layer.spaceship, outsidePriority: Ball.spaceshipPriority, rotation: math.pi, ) - ..initialPosition = Vector2(-13.7, 18.6) + ..initialPosition = Vector2(-13.7, -18.6) ..layer = Layer.spaceshipEntranceRamp; final spaceshipRamp = _SpaceshipRampBackground(); @@ -43,7 +43,7 @@ class SpaceshipRamp extends Forge2DBlueprint { final spaceshipRampForegroundRailing = _SpaceshipRampForegroundRailing(); - final baseRight = _SpaceshipRampBase()..initialPosition = Vector2(1.7, 20); + final baseRight = _SpaceshipRampBase()..initialPosition = Vector2(1.7, -20); addAll([ spaceshipRampBoardOpeningSprite, @@ -70,9 +70,9 @@ class _SpaceshipRampBackground extends BodyComponent final outerLeftCurveShape = BezierCurveShape( controlPoints: [ - Vector2(-30.75, 37.3), - Vector2(-32.5, 71.25), - Vector2(-14.2, 71.25), + Vector2(-30.75, -37.3), + Vector2(-32.5, -71.25), + Vector2(-14.2, -71.25), ], ); @@ -82,8 +82,8 @@ class _SpaceshipRampBackground extends BodyComponent final outerRightCurveShape = BezierCurveShape( controlPoints: [ outerLeftCurveShape.vertices.last, - Vector2(2.5, 71.9), - Vector2(6.1, 44.9), + Vector2(2.5, -71.9), + Vector2(6.1, -44.9), ], ); @@ -93,7 +93,7 @@ class _SpaceshipRampBackground extends BodyComponent final boardOpeningEdgeShape = EdgeShape() ..set( outerRightCurveShape.vertices.last, - Vector2(7.3, 41.1), + Vector2(7.3, -41.1), ); final boardOpeningEdgeShapeFixtureDef = FixtureDef(boardOpeningEdgeShape); fixturesDef.add(boardOpeningEdgeShapeFixtureDef); @@ -179,9 +179,9 @@ class _SpaceshipRampForegroundRailing extends BodyComponent final innerLeftCurveShape = BezierCurveShape( controlPoints: [ - Vector2(-24.5, 38), - Vector2(-26.3, 64), - Vector2(-13.8, 64.5), + Vector2(-24.5, -38), + Vector2(-26.3, -64), + Vector2(-13.8, -64.5), ], ); @@ -191,8 +191,8 @@ class _SpaceshipRampForegroundRailing extends BodyComponent final innerRightCurveShape = BezierCurveShape( controlPoints: [ innerLeftCurveShape.vertices.last, - Vector2(-2.5, 66.2), - Vector2(0, 44.5), + Vector2(-2.5, -66.2), + Vector2(0, -44.5), ], ); @@ -202,7 +202,7 @@ class _SpaceshipRampForegroundRailing extends BodyComponent final boardOpeningEdgeShape = EdgeShape() ..set( innerRightCurveShape.vertices.last, - Vector2(-0.85, 40.8), + Vector2(-0.85, -40.8), ); final boardOpeningEdgeShapeFixtureDef = FixtureDef(boardOpeningEdgeShape); fixturesDef.add(boardOpeningEdgeShapeFixtureDef); @@ -259,9 +259,9 @@ class _SpaceshipRampBase extends BodyComponent with InitialPosition, Layered { controlPoints: [ Vector2(initialPosition.x - baseWidth / 2, initialPosition.y), Vector2(initialPosition.x - baseWidth / 2, initialPosition.y) + - Vector2(2, 5), + Vector2(2, -5), Vector2(initialPosition.x + baseWidth / 2, initialPosition.y) + - Vector2(-2, 5), + Vector2(-2, -5), Vector2(initialPosition.x + baseWidth / 2, initialPosition.y) ], ); diff --git a/packages/pinball_components/lib/src/components/sparky_bumper.dart b/packages/pinball_components/lib/src/components/sparky_bumper.dart index c4798624..dcd20352 100644 --- a/packages/pinball_components/lib/src/components/sparky_bumper.dart +++ b/packages/pinball_components/lib/src/components/sparky_bumper.dart @@ -89,7 +89,7 @@ class SparkyBumper extends BodyComponent with InitialPosition { center: Vector2.zero(), majorRadius: _majorRadius, minorRadius: _minorRadius, - )..rotate(math.pi / 1.9); + )..rotate(math.pi / 2.1); final fixtureDef = FixtureDef(shape) ..friction = 0 ..restitution = 4; diff --git a/packages/pinball_components/lib/src/components/sparky_computer.dart b/packages/pinball_components/lib/src/components/sparky_computer.dart index 6933a9ca..f2edc343 100644 --- a/packages/pinball_components/lib/src/components/sparky_computer.dart +++ b/packages/pinball_components/lib/src/components/sparky_computer.dart @@ -29,24 +29,24 @@ class _ComputerBase extends BodyComponent with InitialPosition { final leftEdge = EdgeShape() ..set( - Vector2(-14.9, 46), - Vector2(-15.3, 49.6), + Vector2(-14.9, -46), + Vector2(-15.3, -49.6), ); final leftEdgeFixtureDef = FixtureDef(leftEdge); fixturesDef.add(leftEdgeFixtureDef); final topEdge = EdgeShape() ..set( - Vector2(-15.3, 49.6), - Vector2(-10.7, 50.6), + Vector2(-15.3, -49.6), + Vector2(-10.7, -50.6), ); final topEdgeFixtureDef = FixtureDef(topEdge); fixturesDef.add(topEdgeFixtureDef); final rightEdge = EdgeShape() ..set( - Vector2(-10.7, 50.6), - Vector2(-9, 47.2), + Vector2(-10.7, -50.6), + Vector2(-9, -47.2), ); final rightEdgeFixtureDef = FixtureDef(rightEdge); fixturesDef.add(rightEdgeFixtureDef); diff --git a/packages/pinball_components/sandbox/pubspec.lock b/packages/pinball_components/sandbox/pubspec.lock index b0de4903..33553ba6 100644 --- a/packages/pinball_components/sandbox/pubspec.lock +++ b/packages/pinball_components/sandbox/pubspec.lock @@ -91,14 +91,14 @@ packages: name: flame url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" flame_forge2d: dependency: "direct main" description: name: flame_forge2d url: "https://pub.dartlang.org" source: hosted - version: "0.10.0" + version: "0.11.0" flutter: dependency: "direct main" description: flutter @@ -134,7 +134,7 @@ packages: name: forge2d url: "https://pub.dartlang.org" source: hosted - version: "0.10.0" + version: "0.11.0" freezed_annotation: dependency: transitive description: diff --git a/packages/pinball_components/sandbox/pubspec.yaml b/packages/pinball_components/sandbox/pubspec.yaml index 94c0479b..cb9acbc8 100644 --- a/packages/pinball_components/sandbox/pubspec.yaml +++ b/packages/pinball_components/sandbox/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: dashbook: ^0.1.7 flame: ^1.1.0 - flame_forge2d: ^0.10.0 + flame_forge2d: ^0.11.0 flutter: sdk: flutter pinball_components: diff --git a/packages/pinball_components/test/src/components/golden/slingshots.png b/packages/pinball_components/test/src/components/golden/slingshots.png index 2e4ada7b..2cbb1f5c 100644 Binary files a/packages/pinball_components/test/src/components/golden/slingshots.png and b/packages/pinball_components/test/src/components/golden/slingshots.png differ diff --git a/packages/pinball_components/test/src/components/slingshot_test.dart b/packages/pinball_components/test/src/components/slingshot_test.dart index 6f015e13..c88cd691 100644 --- a/packages/pinball_components/test/src/components/slingshot_test.dart +++ b/packages/pinball_components/test/src/components/slingshot_test.dart @@ -12,7 +12,7 @@ void main() { final flameTester = FlameTester(TestGame.new); const length = 2.0; const angle = 0.0; - final spritePath = Assets.images.slingshot.leftUpper.keyName; + final spritePath = Assets.images.slingshot.upper.keyName; flameTester.testGameWidget( 'renders correctly',