|
|
@ -8,8 +8,7 @@ import 'package:pinball_components/pinball_components.dart';
|
|
|
|
import 'package:pinball_flame/pinball_flame.dart';
|
|
|
|
import 'package:pinball_flame/pinball_flame.dart';
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template launch_ramp}
|
|
|
|
/// {@template launch_ramp}
|
|
|
|
/// A [Blueprint] which creates the [_LaunchRampBase] and
|
|
|
|
/// Ramp where the ball is launched from.
|
|
|
|
/// [_LaunchRampForegroundRailing].
|
|
|
|
|
|
|
|
/// {@endtemplate}
|
|
|
|
/// {@endtemplate}
|
|
|
|
class LaunchRamp extends Component {
|
|
|
|
class LaunchRamp extends Component {
|
|
|
|
/// {@macro launch_ramp}
|
|
|
|
/// {@macro launch_ramp}
|
|
|
@ -24,11 +23,7 @@ class LaunchRamp extends Component {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template launch_ramp_base}
|
|
|
|
|
|
|
|
/// Ramp the [Ball] is launched from at the beginning of each ball life.
|
|
|
|
|
|
|
|
/// {@endtemplate}
|
|
|
|
|
|
|
|
class _LaunchRampBase extends BodyComponent with Layered, Rendering {
|
|
|
|
class _LaunchRampBase extends BodyComponent with Layered, Rendering {
|
|
|
|
/// {@macro launch_ramp_base}
|
|
|
|
|
|
|
|
_LaunchRampBase()
|
|
|
|
_LaunchRampBase()
|
|
|
|
: super(
|
|
|
|
: super(
|
|
|
|
renderBody: false,
|
|
|
|
renderBody: false,
|
|
|
@ -140,12 +135,7 @@ class _LaunchRampBackgroundRailingSpriteComponent extends SpriteComponent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template launch_ramp_foreground_railing}
|
|
|
|
|
|
|
|
/// Foreground railing for the [_LaunchRampBase] to render in front of the
|
|
|
|
|
|
|
|
/// [Ball].
|
|
|
|
|
|
|
|
/// {@endtemplate}
|
|
|
|
|
|
|
|
class _LaunchRampForegroundRailing extends BodyComponent with Rendering {
|
|
|
|
class _LaunchRampForegroundRailing extends BodyComponent with Rendering {
|
|
|
|
/// {@macro launch_ramp_foreground_railing}
|
|
|
|
|
|
|
|
_LaunchRampForegroundRailing()
|
|
|
|
_LaunchRampForegroundRailing()
|
|
|
|
: super(
|
|
|
|
: super(
|
|
|
|
children: [_LaunchRampForegroundRailingSpriteComponent()],
|
|
|
|
children: [_LaunchRampForegroundRailingSpriteComponent()],
|
|
|
|