|
|
@ -100,25 +100,6 @@ class _LaunchRampBase extends BodyComponent with InitialPosition, Layered {
|
|
|
|
return fixturesDef;
|
|
|
|
return fixturesDef;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
|
|
|
|
await super.onLoad();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final sprite = await gameRef.loadSprite(
|
|
|
|
|
|
|
|
Assets.images.launchRamp.ramp.keyName,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final spriteComponent = SpriteComponent(
|
|
|
|
|
|
|
|
sprite: sprite,
|
|
|
|
|
|
|
|
size: Vector2(44.7, 144.1),
|
|
|
|
|
|
|
|
anchor: Anchor.center,
|
|
|
|
|
|
|
|
position: Vector2(25.65, 0),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await gameRef.add(spriteComponent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Body createBody() {
|
|
|
|
Body createBody() {
|
|
|
|
final bodyDef = BodyDef()
|
|
|
|
final bodyDef = BodyDef()
|
|
|
@ -130,6 +111,28 @@ class _LaunchRampBase extends BodyComponent with InitialPosition, Layered {
|
|
|
|
|
|
|
|
|
|
|
|
return body;
|
|
|
|
return body;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
|
|
|
|
await super.onLoad();
|
|
|
|
|
|
|
|
await _loadSprite();
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _loadSprite() async {
|
|
|
|
|
|
|
|
final sprite = await gameRef.loadSprite(
|
|
|
|
|
|
|
|
Assets.images.launchRamp.ramp.keyName,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await add(
|
|
|
|
|
|
|
|
SpriteComponent(
|
|
|
|
|
|
|
|
sprite: sprite,
|
|
|
|
|
|
|
|
size: sprite.originalSize / 10,
|
|
|
|
|
|
|
|
anchor: Anchor.center,
|
|
|
|
|
|
|
|
position: Vector2(25.65, 0),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template launch_ramp_foreground_railing}
|
|
|
|
/// {@template launch_ramp_foreground_railing}
|
|
|
@ -174,26 +177,6 @@ class _LaunchRampForegroundRailing extends BodyComponent
|
|
|
|
return fixturesDef;
|
|
|
|
return fixturesDef;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
|
|
|
|
await super.onLoad();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final sprite = await gameRef.loadSprite(
|
|
|
|
|
|
|
|
Assets.images.launchRamp.foregroundRailing.keyName,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
final spriteComponent = SpriteComponent(
|
|
|
|
|
|
|
|
sprite: sprite,
|
|
|
|
|
|
|
|
size: Vector2(38.1, 138.6),
|
|
|
|
|
|
|
|
anchor: Anchor.center,
|
|
|
|
|
|
|
|
position: Vector2(22.8, 0),
|
|
|
|
|
|
|
|
priority: 4,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await gameRef.add(spriteComponent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Body createBody() {
|
|
|
|
Body createBody() {
|
|
|
|
final bodyDef = BodyDef()
|
|
|
|
final bodyDef = BodyDef()
|
|
|
@ -205,6 +188,29 @@ class _LaunchRampForegroundRailing extends BodyComponent
|
|
|
|
|
|
|
|
|
|
|
|
return body;
|
|
|
|
return body;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
|
|
|
|
await super.onLoad();
|
|
|
|
|
|
|
|
await _loadSprite();
|
|
|
|
|
|
|
|
renderBody = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _loadSprite() async {
|
|
|
|
|
|
|
|
final sprite = await gameRef.loadSprite(
|
|
|
|
|
|
|
|
Assets.images.launchRamp.foregroundRailing.keyName,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await add(
|
|
|
|
|
|
|
|
SpriteComponent(
|
|
|
|
|
|
|
|
sprite: sprite,
|
|
|
|
|
|
|
|
size: sprite.originalSize / 10,
|
|
|
|
|
|
|
|
anchor: Anchor.center,
|
|
|
|
|
|
|
|
position: Vector2(22.8, 0),
|
|
|
|
|
|
|
|
priority: 4,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template launch_ramp_exit}
|
|
|
|
/// {@template launch_ramp_exit}
|
|
|
|