feat: adjusted FlutterForest priorities

pull/234/head
alestiago 3 years ago
parent c912c36a69
commit 38d7bfa3fc

@ -7,13 +7,14 @@ import 'package:pinball/game/game.dart';
import 'package:pinball_components/pinball_components.dart'; import 'package:pinball_components/pinball_components.dart';
/// {@template flutter_forest} /// {@template flutter_forest}
/// Area positioned at the top right of the [Board] where the [Ball] /// Area positioned at the top right of the [Board] where the [Ball] can bounce
/// can bounce off [DashNestBumper]s. /// off [DashNestBumper]s.
/// {@endtemplate} /// {@endtemplate}
class FlutterForest extends Component { class FlutterForest extends Component {
/// {@macro flutter_forest} /// {@macro flutter_forest}
FlutterForest() FlutterForest()
: super( : super(
priority: RenderPriority.flutterForest,
children: [ children: [
Signpost( Signpost(
children: [ children: [

@ -10,7 +10,6 @@ class DashAnimatronic extends SpriteAnimationComponent with HasGameRef {
: super( : super(
anchor: Anchor.center, anchor: Anchor.center,
playing: false, playing: false,
priority: RenderPriority.dashAnimatronic,
); );
@override @override

@ -25,7 +25,6 @@ class DashNestBumper extends BodyComponent with InitialPosition {
}) : _majorRadius = majorRadius, }) : _majorRadius = majorRadius,
_minorRadius = minorRadius, _minorRadius = minorRadius,
super( super(
priority: RenderPriority.dashBumper,
renderBody: false, renderBody: false,
children: [ children: [
_DashNestBumperSpriteGroupComponent( _DashNestBumperSpriteGroupComponent(

@ -69,11 +69,7 @@ abstract class RenderPriority {
// Flutter Forest // Flutter Forest
static const int signpost = _above + launchRampForegroundRailing; static const int flutterForest = _above + launchRampForegroundRailing;
static const int dashBumper = _above + ballOnBoard;
static const int dashAnimatronic = 2 * _above + launchRamp;
// Sparky Fire Zone // Sparky Fire Zone

@ -49,7 +49,6 @@ class Signpost extends BodyComponent with InitialPosition {
Signpost({ Signpost({
Iterable<Component>? children, Iterable<Component>? children,
}) : super( }) : super(
priority: RenderPriority.signpost,
renderBody: false, renderBody: false,
children: [ children: [
_SignpostSpriteComponent(), _SignpostSpriteComponent(),

Loading…
Cancel
Save