From cd6668c42d160c31f0644e3938a4afa1dc94441f Mon Sep 17 00:00:00 2001 From: RuiAlonso Date: Wed, 23 Mar 2022 15:59:42 +0100 Subject: [PATCH] chore: analysis errors --- lib/game/components/layer.dart | 4 ++-- lib/game/components/spaceship_drop_ramp.dart | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/game/components/layer.dart b/lib/game/components/layer.dart index 66db7f72..c85b2ddd 100644 --- a/lib/game/components/layer.dart +++ b/lib/game/components/layer.dart @@ -60,7 +60,7 @@ enum Layer { spaceship, /// Collide only with Spaceship drop group elements. - spaceship_drop, + spaceshipDrop, } /// {@template layer_mask_bits} @@ -89,7 +89,7 @@ extension LayerMaskBits on Layer { return 0x0005; case Layer.spaceship: return 0x000A; - case Layer.spaceship_drop: + case Layer.spaceshipDrop: return 0x0004; } } diff --git a/lib/game/components/spaceship_drop_ramp.dart b/lib/game/components/spaceship_drop_ramp.dart index 850ab10c..83133345 100644 --- a/lib/game/components/spaceship_drop_ramp.dart +++ b/lib/game/components/spaceship_drop_ramp.dart @@ -1,7 +1,8 @@ +// ignore_for_file: avoid_renaming_method_parameters + import 'dart:math' as math; import 'dart:ui'; -import 'package:flame/components.dart'; import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:pinball/flame/blueprint.dart'; import 'package:pinball/game/game.dart'; @@ -28,7 +29,7 @@ class SpaceshipDropRamp extends Forge2DBlueprint { Vector2(30, 0), Vector2(30, 30), ], - )..layer = Layer.spaceship_drop; + )..layer = Layer.spaceshipDrop; final curvedEntrance = Pathway.arc( color: const Color.fromARGB(255, 226, 226, 218), @@ -38,7 +39,7 @@ class SpaceshipDropRamp extends Forge2DBlueprint { width: 5, rotation: 218 * math.pi / 180, singleWall: true, - )..layer = Layer.spaceship_drop; + )..layer = Layer.spaceshipDrop; final curvedExit = Pathway.arc( color: const Color.fromARGB(255, 226, 226, 218), @@ -48,7 +49,7 @@ class SpaceshipDropRamp extends Forge2DBlueprint { width: 5, rotation: 36 * math.pi / 180, singleWall: true, - )..layer = Layer.spaceship_drop; + )..layer = Layer.spaceshipDrop; addAll([ curvedPath..initialPosition = position, @@ -67,10 +68,10 @@ class SpaceshipDropHole extends RampOpening { /// {@macro spaceship_drop_hole} SpaceshipDropHole() : super( - pathwayLayer: Layer.spaceship_drop, + pathwayLayer: Layer.spaceshipDrop, orientation: RampOrientation.down, ) { - layer = Layer.spaceship_drop; + layer = Layer.spaceshipDrop; } @override