|
|
@ -26,29 +26,33 @@ class LauncherRamp extends Component with HasGameRef<PinballGame> {
|
|
|
|
RampOpeningBallContactCallback<_LauncherRampOpening>(),
|
|
|
|
RampOpeningBallContactCallback<_LauncherRampOpening>(),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final launcherRampRotation =
|
|
|
|
|
|
|
|
-math.atan(18.6 / PinballGame.boardBounds.height);
|
|
|
|
|
|
|
|
|
|
|
|
final straightPath = Pathway.straight(
|
|
|
|
final straightPath = Pathway.straight(
|
|
|
|
color: const Color.fromARGB(255, 34, 255, 0),
|
|
|
|
color: const Color.fromARGB(255, 34, 255, 0),
|
|
|
|
start: Vector2(position.x, position.y),
|
|
|
|
start: position + Vector2(-1.2, 10),
|
|
|
|
end: Vector2(position.x, 74),
|
|
|
|
end: position + Vector2(-1.2, 117),
|
|
|
|
width: 5,
|
|
|
|
width: 5,
|
|
|
|
|
|
|
|
rotation: launcherRampRotation,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
..initialPosition = position
|
|
|
|
..initialPosition = position
|
|
|
|
..layer = layer;
|
|
|
|
..layer = layer;
|
|
|
|
|
|
|
|
|
|
|
|
final curvedPath = Pathway.arc(
|
|
|
|
final curvedPath = Pathway.arc(
|
|
|
|
color: const Color.fromARGB(255, 251, 255, 0),
|
|
|
|
color: const Color.fromARGB(255, 251, 255, 0),
|
|
|
|
center: position + Vector2(-1, 68),
|
|
|
|
center: position + Vector2(-2.8, 87.2),
|
|
|
|
radius: 20,
|
|
|
|
radius: 16.3,
|
|
|
|
angle: 8 * math.pi / 9,
|
|
|
|
angle: math.pi / 2,
|
|
|
|
width: 5,
|
|
|
|
width: 5,
|
|
|
|
rotation: math.pi,
|
|
|
|
rotation: 3 * math.pi / 2,
|
|
|
|
)..layer = layer;
|
|
|
|
)..layer = layer;
|
|
|
|
|
|
|
|
|
|
|
|
final leftOpening = _LauncherRampOpening(rotation: 13 * math.pi / 180)
|
|
|
|
final leftOpening = _LauncherRampOpening(rotation: math.pi / 2)
|
|
|
|
..initialPosition = position + Vector2(1, 49)
|
|
|
|
..initialPosition = position + Vector2(-11.8, 66.3)
|
|
|
|
..layer = Layer.opening;
|
|
|
|
..layer = Layer.opening;
|
|
|
|
final rightOpening = _LauncherRampOpening(rotation: 0)
|
|
|
|
final rightOpening = _LauncherRampOpening(rotation: 0)
|
|
|
|
..initialPosition = position + Vector2(-16, 46)
|
|
|
|
..initialPosition = position + Vector2(-4.9, 59.4)
|
|
|
|
..layer = Layer.opening;
|
|
|
|
..layer = Layer.opening;
|
|
|
|
|
|
|
|
|
|
|
|
await addAll([
|
|
|
|
await addAll([
|
|
|
|