chore: clean up fixtures

pull/238/head
Allison Ryan 3 years ago
parent 008f60fca2
commit 3b27af4043

@ -106,66 +106,59 @@ class _OuterBoundary extends BodyComponent with InitialPosition {
Vector2(3.6, -70.2), Vector2(3.6, -70.2),
Vector2(-14.1, -70.2), Vector2(-14.1, -70.2),
); );
final topWallFixtureDef = FixtureDef(topWall);
final topLeftCurve = BezierCurveShape( final topLeftCurve = BezierCurveShape(
controlPoints: [ controlPoints: [
Vector2(-32.3, -57.2), topWall.vertex1,
Vector2(-31.5, -69.9), Vector2(-31.5, -69.9),
Vector2(-14.1, -70.2), Vector2(-32.3, -57.2),
], ],
); );
final topLeftCurveFixtureDef = FixtureDef(topLeftCurve);
final topLeftWall = EdgeShape() final topLeftWall = EdgeShape()
..set( ..set(
Vector2(-32.3, -57.2), topLeftCurve.vertices.last,
Vector2(-33.5, -44), Vector2(-33.5, -44),
); );
final topLeftWallFixtureDef = FixtureDef(topLeftWall);
final upperLeftWallCurve = BezierCurveShape( final upperLeftWallCurve = BezierCurveShape(
controlPoints: [ controlPoints: [
Vector2(-33.5, -44), topLeftWall.vertex1,
Vector2(-33.9, -40.7), Vector2(-33.9, -40.7),
Vector2(-32.5, -39), Vector2(-32.5, -39),
], ],
); );
final upperLeftWallCurveFixtureDef = FixtureDef(upperLeftWallCurve);
final middleLeftWallCurve = BezierCurveShape( final middleLeftWallCurve = BezierCurveShape(
controlPoints: [ controlPoints: [
Vector2(-32.5, -39), upperLeftWallCurve.vertices.last,
Vector2(-23.2, -31.4), Vector2(-23.2, -31.4),
Vector2(-33.9, -21.8), Vector2(-33.9, -21.8),
], ],
); );
final middleLeftWallCurveFixtureDef = FixtureDef(middleLeftWallCurve);
final lowerLeftWallCurve = BezierCurveShape( final lowerLeftWallCurve = BezierCurveShape(
controlPoints: [ controlPoints: [
Vector2(-33.9, -21.8), middleLeftWallCurve.vertices.last,
Vector2(-32.4, -17.6), Vector2(-32.4, -17.6),
Vector2(-37.3, -11), Vector2(-37.3, -11),
], ],
); );
final lowerLeftWallCurveFixtureDef = FixtureDef(lowerLeftWallCurve);
final bottomLeftWall = EdgeShape() final bottomLeftWall = EdgeShape()
..set( ..set(
Vector2(-37.3, -11), lowerLeftWallCurve.vertices.last,
Vector2(-43.9, 41.8), Vector2(-43.9, 41.8),
); );
final bottomLeftWallFixtureDef = FixtureDef(bottomLeftWall);
return [ return [
topWallFixtureDef, FixtureDef(topWall),
topLeftCurveFixtureDef, FixtureDef(topLeftCurve),
topLeftWallFixtureDef, FixtureDef(topLeftWall),
upperLeftWallCurveFixtureDef, FixtureDef(upperLeftWallCurve),
middleLeftWallCurveFixtureDef, FixtureDef(middleLeftWallCurve),
lowerLeftWallCurveFixtureDef, FixtureDef(lowerLeftWallCurve),
bottomLeftWallFixtureDef, FixtureDef(bottomLeftWall),
]; ];
} }

Loading…
Cancel
Save