From dea68d65ee4230d685130d7ab11f1736fbd9c73c Mon Sep 17 00:00:00 2001 From: alestiago Date: Mon, 2 May 2022 00:04:36 +0100 Subject: [PATCH] refactor: removed priority occurences --- lib/game/pinball_game.dart | 2 -- .../pinball_components/lib/src/components/fire_effect.dart | 2 -- packages/pinball_components/lib/src/components/layer.dart | 3 --- packages/pinball_components/lib/src/components/z_indexes.dart | 4 ++-- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index 872bcd7e..9794f1ff 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -209,8 +209,6 @@ class _DebugGameBallsController extends _GameBallsController { // TODO(wolfenrain): investigate this CI failure. // coverage:ignore-start class _DebugInformation extends Component with HasGameRef { - _DebugInformation() : super(priority: ZIndexes.debugInfo); - @override PositionType get positionType => PositionType.widget; diff --git a/packages/pinball_components/lib/src/components/fire_effect.dart b/packages/pinball_components/lib/src/components/fire_effect.dart index 14639527..e793b3e6 100644 --- a/packages/pinball_components/lib/src/components/fire_effect.dart +++ b/packages/pinball_components/lib/src/components/fire_effect.dart @@ -26,10 +26,8 @@ class FireEffect extends ParticleSystemComponent { required this.burstPower, required this.direction, Vector2? position, - int? priority, }) : super( position: position, - priority: priority, ); /// A [double] value that will define how "strong" the burst of particles diff --git a/packages/pinball_components/lib/src/components/layer.dart b/packages/pinball_components/lib/src/components/layer.dart index 9b20ecf2..a39ad837 100644 --- a/packages/pinball_components/lib/src/components/layer.dart +++ b/packages/pinball_components/lib/src/components/layer.dart @@ -8,9 +8,6 @@ import 'package:flutter/material.dart'; /// [BodyComponent]s with compatible [Layer]s can collide with each other, /// ignoring others. This compatibility depends on bit masking operation /// between layers. For more information read: https://en.wikipedia.org/wiki/Mask_(computing). -/// -/// A parent [Layered] have priority against its children's layer. Them won't be -/// changed but will be ignored. /// {@endtemplate} mixin Layered on BodyComponent { Layer _layer = Layer.all; diff --git a/packages/pinball_components/lib/src/components/z_indexes.dart b/packages/pinball_components/lib/src/components/z_indexes.dart index 21a59cca..e38683a2 100644 --- a/packages/pinball_components/lib/src/components/z_indexes.dart +++ b/packages/pinball_components/lib/src/components/z_indexes.dart @@ -21,8 +21,8 @@ abstract class ZIndexes { // Background - // TODO(allisonryan0002): fix this magic priority. Could bump all priorities - // so there are no negatives. + // TODO(allisonryan0002): fix this magic zindex. Could bump all priorities so + // there are no negatives. static const boardBackground = 3 * _below + _base; static const decal = _above + boardBackground;