|
|
@ -22,10 +22,10 @@ class LaunchRamp extends Forge2DBlueprint {
|
|
|
|
final launchRampForegroundRailing = _LaunchRampForegroundRailing();
|
|
|
|
final launchRampForegroundRailing = _LaunchRampForegroundRailing();
|
|
|
|
|
|
|
|
|
|
|
|
final launchRampExit = _LaunchRampExit(rotation: math.pi / 2)
|
|
|
|
final launchRampExit = _LaunchRampExit(rotation: math.pi / 2)
|
|
|
|
..initialPosition = Vector2(0.6, 34);
|
|
|
|
..initialPosition = Vector2(0.6, -34);
|
|
|
|
|
|
|
|
|
|
|
|
final launchRampCloseWall = _LaunchRampCloseWall()
|
|
|
|
final launchRampCloseWall = _LaunchRampCloseWall()
|
|
|
|
..initialPosition = Vector2(4, 66.5);
|
|
|
|
..initialPosition = Vector2(4, -69.5);
|
|
|
|
|
|
|
|
|
|
|
|
addAll([
|
|
|
|
addAll([
|
|
|
|
launchRampBase,
|
|
|
|
launchRampBase,
|
|
|
@ -50,50 +50,50 @@ class _LaunchRampBase extends BodyComponent with InitialPosition, Layered {
|
|
|
|
|
|
|
|
|
|
|
|
final rightStraightShape = EdgeShape()
|
|
|
|
final rightStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(31.4, 61.4),
|
|
|
|
Vector2(31.4, -61.4),
|
|
|
|
Vector2(46.5, -68.4),
|
|
|
|
Vector2(46.5, 68.4),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final leftStraightShape = EdgeShape()
|
|
|
|
final leftStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(27.8, 61.4),
|
|
|
|
Vector2(27.8, -61.4),
|
|
|
|
Vector2(41.5, -68.4),
|
|
|
|
Vector2(41.5, 68.4),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final leftStraightFixtureDef = FixtureDef(leftStraightShape);
|
|
|
|
final leftStraightFixtureDef = FixtureDef(leftStraightShape);
|
|
|
|
fixturesDef.add(leftStraightFixtureDef);
|
|
|
|
fixturesDef.add(leftStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final topCurveShape = ArcShape(
|
|
|
|
final topCurveShape = ArcShape(
|
|
|
|
center: Vector2(20.5, 61.1),
|
|
|
|
center: Vector2(20.5, -61.1),
|
|
|
|
arcRadius: 11,
|
|
|
|
arcRadius: 11,
|
|
|
|
angle: 1.6,
|
|
|
|
angle: 1.6,
|
|
|
|
rotation: -1.65,
|
|
|
|
rotation: 0.1,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final topCurveFixtureDef = FixtureDef(topCurveShape);
|
|
|
|
final topCurveFixtureDef = FixtureDef(topCurveShape);
|
|
|
|
fixturesDef.add(topCurveFixtureDef);
|
|
|
|
fixturesDef.add(topCurveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final bottomCurveShape = ArcShape(
|
|
|
|
final bottomCurveShape = ArcShape(
|
|
|
|
center: Vector2(19.3, 60.3),
|
|
|
|
center: Vector2(19.3, -60.3),
|
|
|
|
arcRadius: 8.5,
|
|
|
|
arcRadius: 8.5,
|
|
|
|
angle: 1.48,
|
|
|
|
angle: 1.48,
|
|
|
|
rotation: -1.58,
|
|
|
|
rotation: 0.1,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final bottomCurveFixtureDef = FixtureDef(bottomCurveShape);
|
|
|
|
final bottomCurveFixtureDef = FixtureDef(bottomCurveShape);
|
|
|
|
fixturesDef.add(bottomCurveFixtureDef);
|
|
|
|
fixturesDef.add(bottomCurveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(3.7, 70.1),
|
|
|
|
Vector2(3.7, -70.1),
|
|
|
|
Vector2(19.1, 72.1),
|
|
|
|
Vector2(19.1, -72.1),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final bottomStraightShape = EdgeShape()
|
|
|
|
final bottomStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(3.7, 66.9),
|
|
|
|
Vector2(3.7, -66.9),
|
|
|
|
Vector2(19.1, 68.8),
|
|
|
|
Vector2(19.1, -68.8),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final bottomStraightFixtureDef = FixtureDef(bottomStraightShape);
|
|
|
|
final bottomStraightFixtureDef = FixtureDef(bottomStraightShape);
|
|
|
|
fixturesDef.add(bottomStraightFixtureDef);
|
|
|
|
fixturesDef.add(bottomStraightFixtureDef);
|
|
|
@ -150,25 +150,25 @@ class _LaunchRampForegroundRailing extends BodyComponent with InitialPosition {
|
|
|
|
|
|
|
|
|
|
|
|
final rightStraightShape = EdgeShape()
|
|
|
|
final rightStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(27.6, 57.9),
|
|
|
|
Vector2(27.6, -57.9),
|
|
|
|
Vector2(30, 35.1),
|
|
|
|
Vector2(30, -35.1),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final curveShape = ArcShape(
|
|
|
|
final curveShape = ArcShape(
|
|
|
|
center: Vector2(20.1, 59.3),
|
|
|
|
center: Vector2(20.1, -59.3),
|
|
|
|
arcRadius: 7.5,
|
|
|
|
arcRadius: 7.5,
|
|
|
|
angle: 1.8,
|
|
|
|
angle: 1.8,
|
|
|
|
rotation: -1.63,
|
|
|
|
rotation: -0.13,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final curveFixtureDef = FixtureDef(curveShape);
|
|
|
|
final curveFixtureDef = FixtureDef(curveShape);
|
|
|
|
fixturesDef.add(curveFixtureDef);
|
|
|
|
fixturesDef.add(curveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
..set(
|
|
|
|
..set(
|
|
|
|
Vector2(3.7, 66.8),
|
|
|
|
Vector2(3.7, -66.8),
|
|
|
|
Vector2(19.7, 66.8),
|
|
|
|
Vector2(19.7, -66.8),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
@ -221,7 +221,7 @@ class _LaunchRampCloseWall extends BodyComponent with InitialPosition, Layered {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Body createBody() {
|
|
|
|
Body createBody() {
|
|
|
|
final shape = EdgeShape()..set(Vector2.zero(), Vector2(0, 4));
|
|
|
|
final shape = EdgeShape()..set(Vector2.zero(), Vector2(0, 3));
|
|
|
|
|
|
|
|
|
|
|
|
final fixtureDef = FixtureDef(shape);
|
|
|
|
final fixtureDef = FixtureDef(shape);
|
|
|
|
|
|
|
|
|
|
|
|