|
|
@ -48,58 +48,55 @@ class LauncherRamp extends BodyComponent with InitialPosition, Layered {
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedRightStraightShape = 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 elevatedRightStraightFixtureDef =
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
FixtureDef(elevatedRightStraightShape);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
fixturesDef.add(elevatedRightStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedLeftStraightShape = 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 elevatedLeftStraightFixtureDef =
|
|
|
|
final leftStraightFixtureDef = FixtureDef(leftStraightShape);
|
|
|
|
FixtureDef(elevatedLeftStraightShape);
|
|
|
|
fixturesDef.add(leftStraightFixtureDef);
|
|
|
|
fixturesDef.add(elevatedLeftStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedTopCurveShape = 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: -1.65,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final elevatedTopCurveFixtureDef = FixtureDef(elevatedTopCurveShape);
|
|
|
|
final topCurveFixtureDef = FixtureDef(topCurveShape);
|
|
|
|
fixturesDef.add(elevatedTopCurveFixtureDef);
|
|
|
|
fixturesDef.add(topCurveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedTopStraightShape = EdgeShape()
|
|
|
|
final bottomCurveShape = ArcShape(
|
|
|
|
..set(
|
|
|
|
|
|
|
|
Vector2(3.7, 70.1),
|
|
|
|
|
|
|
|
Vector2(19.1, 72.1),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final elevatedTopStraightFixtureDef = FixtureDef(elevatedTopStraightShape);
|
|
|
|
|
|
|
|
fixturesDef.add(elevatedTopStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedBottomCurveShape = 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: -1.58,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final elevatedBottomCurveFixtureDef = FixtureDef(elevatedBottomCurveShape);
|
|
|
|
final bottomCurveFixtureDef = FixtureDef(bottomCurveShape);
|
|
|
|
fixturesDef.add(elevatedBottomCurveFixtureDef);
|
|
|
|
fixturesDef.add(bottomCurveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
|
|
|
|
..set(
|
|
|
|
|
|
|
|
Vector2(3.7, 70.1),
|
|
|
|
|
|
|
|
Vector2(19.1, 72.1),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final elevatedBottomStraightShape = 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 elevatedBottomStraightFixtureDef =
|
|
|
|
final bottomStraightFixtureDef = FixtureDef(bottomStraightShape);
|
|
|
|
FixtureDef(elevatedBottomStraightShape);
|
|
|
|
fixturesDef.add(bottomStraightFixtureDef);
|
|
|
|
fixturesDef.add(elevatedBottomStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fixturesDef;
|
|
|
|
return fixturesDef;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -149,30 +146,30 @@ class LauncherForegroundRailing extends BodyComponent
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
|
|
|
|
|
|
|
|
|
final groundRightStraightShape = 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 groundRightStraightFixtureDef = FixtureDef(groundRightStraightShape);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
fixturesDef.add(groundRightStraightFixtureDef);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
final groundTopStraightShape = EdgeShape()
|
|
|
|
final curveShape = ArcShape(
|
|
|
|
..set(
|
|
|
|
|
|
|
|
Vector2(3.7, 66.8),
|
|
|
|
|
|
|
|
Vector2(19.7, 66.8),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final groundTopStraightFixtureDef = FixtureDef(groundTopStraightShape);
|
|
|
|
|
|
|
|
fixturesDef.add(groundTopStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final groundCurveShape = 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: -1.63,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final groundCurveFixtureDef = FixtureDef(groundCurveShape);
|
|
|
|
final curveFixtureDef = FixtureDef(curveShape);
|
|
|
|
fixturesDef.add(groundCurveFixtureDef);
|
|
|
|
fixturesDef.add(curveFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
|
|
|
|
..set(
|
|
|
|
|
|
|
|
Vector2(3.7, 66.8),
|
|
|
|
|
|
|
|
Vector2(19.7, 66.8),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
|
|
|
|
fixturesDef.add(topStraightFixtureDef);
|
|
|
|
|
|
|
|
|
|
|
|
return fixturesDef;
|
|
|
|
return fixturesDef;
|
|
|
|
}
|
|
|
|
}
|
|
|
|