|
|
@ -26,20 +26,26 @@ class SpaceshipRamp extends Component {
|
|
|
|
Iterable<Component>? children,
|
|
|
|
Iterable<Component>? children,
|
|
|
|
}) : super(
|
|
|
|
}) : super(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_SpaceshipRampOpening(
|
|
|
|
FlameBlocProvider<SpaceshipRampCubit, SpaceshipRampState>(
|
|
|
|
outsideLayer: Layer.spaceship,
|
|
|
|
create: SpaceshipRampCubit.new,
|
|
|
|
outsidePriority: ZIndexes.ballOnSpaceship,
|
|
|
|
children: [
|
|
|
|
rotation: math.pi,
|
|
|
|
_SpaceshipRampOpening(
|
|
|
|
)
|
|
|
|
outsideLayer: Layer.spaceship,
|
|
|
|
..initialPosition = Vector2(-13.7, -18.6)
|
|
|
|
outsidePriority: ZIndexes.ballOnSpaceship,
|
|
|
|
..layer = Layer.spaceshipEntranceRamp,
|
|
|
|
rotation: math.pi,
|
|
|
|
_SpaceshipRampBackground(),
|
|
|
|
)
|
|
|
|
SpaceshipRampBoardOpening()..initialPosition = Vector2(3.4, -39.5),
|
|
|
|
..initialPosition = Vector2(-13.7, -18.6)
|
|
|
|
_SpaceshipRampForegroundRailing(),
|
|
|
|
..layer = Layer.spaceshipEntranceRamp,
|
|
|
|
SpaceshipRampBase()..initialPosition = Vector2(3.4, -42.5),
|
|
|
|
_SpaceshipRampBackground(),
|
|
|
|
_SpaceshipRampBackgroundRailingSpriteComponent(),
|
|
|
|
SpaceshipRampBoardOpening()
|
|
|
|
SpaceshipRampArrowSpriteComponent(),
|
|
|
|
..initialPosition = Vector2(3.4, -39.5),
|
|
|
|
...?children,
|
|
|
|
_SpaceshipRampForegroundRailing(),
|
|
|
|
|
|
|
|
SpaceshipRampBase()..initialPosition = Vector2(3.4, -42.5),
|
|
|
|
|
|
|
|
_SpaceshipRampBackgroundRailingSpriteComponent(),
|
|
|
|
|
|
|
|
SpaceshipRampArrowSpriteComponent(),
|
|
|
|
|
|
|
|
...?children,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -155,8 +161,7 @@ class _SpaceshipRampBackgroundRampSpriteComponent extends SpriteComponent
|
|
|
|
/// {@endtemplate}
|
|
|
|
/// {@endtemplate}
|
|
|
|
@visibleForTesting
|
|
|
|
@visibleForTesting
|
|
|
|
class SpaceshipRampArrowSpriteComponent
|
|
|
|
class SpaceshipRampArrowSpriteComponent
|
|
|
|
extends SpriteGroupComponent<ArrowLightState>
|
|
|
|
extends SpriteGroupComponent<ArrowLightState> with HasGameRef, ZIndex {
|
|
|
|
with HasGameRef, ParentIsA<SpaceshipRamp>, ZIndex {
|
|
|
|
|
|
|
|
/// {@macro spaceship_ramp_arrow_sprite_component}
|
|
|
|
/// {@macro spaceship_ramp_arrow_sprite_component}
|
|
|
|
SpaceshipRampArrowSpriteComponent()
|
|
|
|
SpaceshipRampArrowSpriteComponent()
|
|
|
|
: super(
|
|
|
|
: super(
|
|
|
@ -210,7 +215,7 @@ extension on ArrowLightState {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class SpaceshipRampBoardOpening extends BodyComponent
|
|
|
|
class SpaceshipRampBoardOpening extends BodyComponent
|
|
|
|
with Layered, ZIndex, InitialPosition, ParentIsA<SpaceshipRamp> {
|
|
|
|
with Layered, ZIndex, InitialPosition {
|
|
|
|
SpaceshipRampBoardOpening()
|
|
|
|
SpaceshipRampBoardOpening()
|
|
|
|
: super(
|
|
|
|
: super(
|
|
|
|
renderBody: false,
|
|
|
|
renderBody: false,
|
|
|
|