From 3d6cd88f60bf7d35c8aee2e99f94accc69c6b37f Mon Sep 17 00:00:00 2001 From: Allison Ryan Date: Wed, 6 Apr 2022 14:13:52 -0500 Subject: [PATCH] refactor: reposition --- .../components/controlled_sparky_computer.dart | 4 ++-- lib/game/pinball_game.dart | 2 +- .../lib/src/components/ball.dart | 2 +- .../lib/src/components/sparky_computer.dart | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/game/components/controlled_sparky_computer.dart b/lib/game/components/controlled_sparky_computer.dart index 4d396037..951aed55 100644 --- a/lib/game/components/controlled_sparky_computer.dart +++ b/lib/game/components/controlled_sparky_computer.dart @@ -18,7 +18,7 @@ class ControlledSparkyComputer extends SparkyComputer void build(Forge2DGame _) { addContactCallback(_SparkyTurboChargeSensorBallContactCallback()); final sparkyTurboChargeSensor = _SparkyTurboChargeSensor() - ..initialPosition = Vector2(-13.4, 49.8); + ..initialPosition = Vector2(-13, 49.8); add(sparkyTurboChargeSensor); super.build(_); } @@ -47,7 +47,7 @@ class _SparkyTurboChargeSensor extends BodyComponent with InitialPosition { /// Controller attached to a [SparkyComputer] that handles its game related /// logic. /// {@endtemplate} -//TODO(allisonryan0002): listen for turbo charge game bonus and animate Sparky. +// TODO(allisonryan0002): listen for turbo charge game bonus and animate Sparky. class SparkyComputerController extends ComponentController { /// {@macro sparky_computer_controller} diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index 4e01c7ba..c57d5f5e 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -148,7 +148,7 @@ class DebugPinballGame extends PinballGame with TapDetector { @override Future onLoad() async { await super.onLoad(); - // await _loadBackground(); + await _loadBackground(); } // TODO(alestiago): Move to PinballGame once we have the real background diff --git a/packages/pinball_components/lib/src/components/ball.dart b/packages/pinball_components/lib/src/components/ball.dart index cd682b00..0cbd3711 100644 --- a/packages/pinball_components/lib/src/components/ball.dart +++ b/packages/pinball_components/lib/src/components/ball.dart @@ -66,7 +66,7 @@ class Ball extends BodyComponent /// /// The [Ball] will no longer be affected by any forces, including it's /// weight and those emitted from collisions. - //TODO(allisonryan0002): prevent motion from contact with other balls. + // TODO(allisonryan0002): prevent motion from contact with other balls. void stop() { body ..gravityScale = 0 diff --git a/packages/pinball_components/lib/src/components/sparky_computer.dart b/packages/pinball_components/lib/src/components/sparky_computer.dart index 0f02be71..dc01474a 100644 --- a/packages/pinball_components/lib/src/components/sparky_computer.dart +++ b/packages/pinball_components/lib/src/components/sparky_computer.dart @@ -28,24 +28,24 @@ class _ComputerBase extends BodyComponent with InitialPosition { final leftEdge = EdgeShape() ..set( - Vector2(-15.3, 46), - Vector2(-15.7, 49.6), + Vector2(-14.9, 46), + Vector2(-15.3, 49.6), ); final leftEdgeFixtureDef = FixtureDef(leftEdge); fixturesDef.add(leftEdgeFixtureDef); final topEdge = EdgeShape() ..set( - Vector2(-15.7, 49.6), - Vector2(-11.1, 50.6), + Vector2(-15.3, 49.6), + Vector2(-10.7, 50.6), ); final topEdgeFixtureDef = FixtureDef(topEdge); fixturesDef.add(topEdgeFixtureDef); final rightEdge = EdgeShape() ..set( - Vector2(-11.1, 50.6), - Vector2(-9.4, 47.2), + Vector2(-10.7, 50.6), + Vector2(-9, 47.2), ); final rightEdgeFixtureDef = FixtureDef(rightEdge); fixturesDef.add(rightEdgeFixtureDef); @@ -82,7 +82,7 @@ class _ComputerBase extends BodyComponent with InitialPosition { sprite: sprite, size: sprite.originalSize / 10, anchor: Anchor.center, - position: Vector2(-12.35, -48.35), + position: Vector2(-11.95, -48.35), ), ); } @@ -92,7 +92,7 @@ class _ComputerTop extends SpriteComponent with HasGameRef { _ComputerTop() : super( anchor: Anchor.center, - position: Vector2(-12.85, -49.75), + position: Vector2(-12.45, -49.75), priority: 1, );