refactor: final size and positions for alien bumpers

pull/166/head
RuiAlonso 4 years ago
parent c4971a6c6f
commit bd8a97f2d7

@ -25,14 +25,14 @@ class AlienZone extends Component with HasGameRef<PinballGame> {
gameRef.addContactCallback(_ControlledAlienBumperBallContactCallback()); gameRef.addContactCallback(_ControlledAlienBumperBallContactCallback());
final lowerLeftBumper = _ControlledAlienBumper.a() final lowerBumper = _ControlledAlienBumper.a()
..initialPosition = Vector2(-31, 10); ..initialPosition = Vector2(-32.52, 9.34);
final upperLeftBumper = _ControlledAlienBumper.b() final upperBumper = _ControlledAlienBumper.b()
..initialPosition = Vector2(-22, 17); ..initialPosition = Vector2(-22.89, 17.43);
await addAll([ await addAll([
lowerLeftBumper, lowerBumper,
upperLeftBumper, upperBumper,
]); ]);
} }
} }

@ -25,26 +25,28 @@ class AlienBumper extends BodyComponent with InitialPosition {
/// {@macro alien_bumper} /// {@macro alien_bumper}
AlienBumper.a() AlienBumper.a()
: this._( : this._(
majorRadius: 3.3, majorRadius: 3.52,
minorRadius: 2.8, minorRadius: 2.97,
activeAssetPath: Assets.images.alienBumper.a.active.keyName, activeAssetPath: Assets.images.alienBumper.a.active.keyName,
inactiveAssetPath: Assets.images.alienBumper.a.inactive.keyName, inactiveAssetPath: Assets.images.alienBumper.a.inactive.keyName,
spriteComponent: SpriteComponent( spriteComponent: SpriteComponent(
anchor: Anchor.center, anchor: Anchor.center,
position: Vector2(0, -0.25), position: Vector2(0, -0.1),
angle: 15.9 * math.pi / 180,
), ),
); );
/// {@macro alien_bumper} /// {@macro alien_bumper}
AlienBumper.b() AlienBumper.b()
: this._( : this._(
majorRadius: 3.3, majorRadius: 3.19,
minorRadius: 2.8, minorRadius: 2.79,
activeAssetPath: Assets.images.alienBumper.b.active.keyName, activeAssetPath: Assets.images.alienBumper.b.active.keyName,
inactiveAssetPath: Assets.images.alienBumper.b.inactive.keyName, inactiveAssetPath: Assets.images.alienBumper.b.inactive.keyName,
spriteComponent: SpriteComponent( spriteComponent: SpriteComponent(
anchor: Anchor.center, anchor: Anchor.center,
position: Vector2(0, -0.25), position: Vector2(0, -0.1),
angle: 15.9 * math.pi / 180,
), ),
); );

Loading…
Cancel
Save