|
|
@ -164,7 +164,13 @@ class _LaunchRampBackgroundRailingSpriteComponent extends SpriteComponent
|
|
|
|
/// {@endtemplate}
|
|
|
|
/// {@endtemplate}
|
|
|
|
class _LaunchRampForegroundRailing extends BodyComponent with InitialPosition {
|
|
|
|
class _LaunchRampForegroundRailing extends BodyComponent with InitialPosition {
|
|
|
|
/// {@macro launch_ramp_foreground_railing}
|
|
|
|
/// {@macro launch_ramp_foreground_railing}
|
|
|
|
_LaunchRampForegroundRailing() : super(priority: Ball.launchRampPriority + 1);
|
|
|
|
_LaunchRampForegroundRailing()
|
|
|
|
|
|
|
|
: super(
|
|
|
|
|
|
|
|
priority: Ball.launchRampPriority + 1,
|
|
|
|
|
|
|
|
children: [_LaunchRampForegroundRailingSpriteComponent()],
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
List<FixtureDef> _createFixtureDefs() {
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
|
final fixturesDef = <FixtureDef>[];
|
|
|
@ -172,7 +178,7 @@ 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(38.1, 42.6),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
final rightStraightFixtureDef = FixtureDef(rightStraightShape);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
|
fixturesDef.add(rightStraightFixtureDef);
|
|
|
@ -208,14 +214,6 @@ class _LaunchRampForegroundRailing extends BodyComponent with InitialPosition {
|
|
|
|
|
|
|
|
|
|
|
|
return body;
|
|
|
|
return body;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
|
|
|
|
await super.onLoad();
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await add(_LaunchRampForegroundRailingSpriteComponent());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _LaunchRampForegroundRailingSpriteComponent extends SpriteComponent
|
|
|
|
class _LaunchRampForegroundRailingSpriteComponent extends SpriteComponent
|
|
|
|