|
|
|
@ -31,7 +31,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition {
|
|
|
|
|
///{@macro dino_top_wall}
|
|
|
|
|
_DinoTopWall()
|
|
|
|
|
: super(
|
|
|
|
|
priority: 1,
|
|
|
|
|
// TODO(ruimiguel): set final priority when RenderPriority PR merged.
|
|
|
|
|
priority: Ball.boardPriority + 1,
|
|
|
|
|
children: [_DinoTopWallSpriteComponent()],
|
|
|
|
|
) {
|
|
|
|
|
renderBody = false;
|
|
|
|
@ -42,7 +43,7 @@ class _DinoTopWall extends BodyComponent with InitialPosition {
|
|
|
|
|
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
|
..set(
|
|
|
|
|
Vector2(28.4, -35.1),
|
|
|
|
|
Vector2(28.65, -35.1),
|
|
|
|
|
Vector2(29.5, -35.1),
|
|
|
|
|
);
|
|
|
|
|
final topStraightFixtureDef = FixtureDef(topStraightShape);
|
|
|
|
@ -69,8 +70,8 @@ class _DinoTopWall extends BodyComponent with InitialPosition {
|
|
|
|
|
final bottomCurveShape = BezierCurveShape(
|
|
|
|
|
controlPoints: [
|
|
|
|
|
middleCurveShape.vertices.last,
|
|
|
|
|
Vector2(21.15, -16),
|
|
|
|
|
Vector2(25.6, -15.2),
|
|
|
|
|
Vector2(21.5, -15.8),
|
|
|
|
|
Vector2(25.8, -14.8),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
fixturesDef.add(FixtureDef(bottomCurveShape));
|
|
|
|
@ -126,6 +127,8 @@ class _DinoBottomWall extends BodyComponent with InitialPosition {
|
|
|
|
|
///{@macro dino_top_wall}
|
|
|
|
|
_DinoBottomWall()
|
|
|
|
|
: super(
|
|
|
|
|
// TODO(ruimiguel): set final priority when RenderPriority PR merged.
|
|
|
|
|
priority: Ball.boardPriority + 1,
|
|
|
|
|
children: [_DinoBottomWallSpriteComponent()],
|
|
|
|
|
) {
|
|
|
|
|
renderBody = false;
|
|
|
|
@ -136,7 +139,7 @@ class _DinoBottomWall extends BodyComponent with InitialPosition {
|
|
|
|
|
const restitution = 1.0;
|
|
|
|
|
|
|
|
|
|
final topStraightControlPoints = [
|
|
|
|
|
Vector2(32.4, -8.3),
|
|
|
|
|
Vector2(32.4, -8.8),
|
|
|
|
|
Vector2(25, -7.7),
|
|
|
|
|
];
|
|
|
|
|
final topStraightShape = EdgeShape()
|
|
|
|
@ -220,6 +223,6 @@ class _DinoBottomWallSpriteComponent extends SpriteComponent with HasGameRef {
|
|
|
|
|
);
|
|
|
|
|
this.sprite = sprite;
|
|
|
|
|
size = sprite.originalSize / 10;
|
|
|
|
|
position = Vector2(23.8, -9.5);
|
|
|
|
|
position = Vector2(23.6, -9.5);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|