refactor: applied PR suggestions

pull/282/head
alestiago 3 years ago
parent 9f998b4aa1
commit 80b7b3c92a

@ -13,7 +13,7 @@ class DinoDesert extends Component {
DinoDesert()
: super(
children: [
// ChromeDino()..initialPosition = Vector2(12.3, -6.9),
ChromeDino()..initialPosition = Vector2(12.3, -6.9),
DinoWalls(),
Slingshots(),
],

@ -3,7 +3,8 @@ import 'package:pinball/game/components/components.dart';
import 'package:pinball_components/pinball_components.dart' hide Assets;
/// {@template launcher}
/// Section where the ball is launched from.
/// Channel on the right side of the board containing the [LaunchRamp],
/// [Plunger], and [RocketSpriteComponent].
/// {@endtemplate}
class Launcher extends Component {
/// {@macro launcher}

@ -52,10 +52,7 @@ class PinballGame extends Forge2DGame
];
final decals = [
GoogleWord(
position: Vector2(
BoardDimensions.bounds.center.dx - 4.1,
BoardDimensions.bounds.center.dy + 1.8,
),
position: Vector2(-4.1, 1.8),
),
Multipliers(),
];

@ -4,7 +4,7 @@ import 'package:pinball_components/pinball_components.dart';
import 'package:pinball_flame/pinball_flame.dart';
/// {@template boundaries}
/// Pinball machine boundaring walls.
/// Pinball machine walls.
/// {@endtemplate}
class Boundaries extends Component {
/// {@macro boundaries}

@ -6,11 +6,11 @@ import 'package:pinball_components/gen/assets.gen.dart';
import 'package:pinball_components/pinball_components.dart' hide Assets;
import 'package:pinball_flame/pinball_flame.dart';
/// {@template dinowalls}
/// {@template dino_walls}
/// Walls near the [ChromeDino].
/// {@endtemplate}
class DinoWalls extends Component {
/// {@macro dinowalls}
/// {@macro dino_walls}
DinoWalls()
: super(
children: [

@ -8,7 +8,7 @@ import 'package:pinball_components/pinball_components.dart' hide Assets;
import 'package:pinball_flame/pinball_flame.dart';
/// {@template spaceship_ramp}
/// Raamp leading into the [AndroidSpaceship].
/// Ramp leading into the [AndroidSpaceship].
/// {@endtemplate}
class SpaceshipRamp extends Component {
/// {@macro spaceship_ramp}

@ -42,15 +42,12 @@ void main() {
});
flameTester.testGameWidget(
'red circle rendes behind blue circle',
'red circle renders behind blue circle',
setUp: (game, tester) async {
final redSquare = _TestCircleComponent(Colors.red)..zIndex = 0;
final blueSquare = _TestCircleComponent(Colors.blue)..zIndex = 1;
final canvas = ZCanvasComponent(
children: [
blueSquare,
redSquare,
_TestCircleComponent(Colors.blue)..zIndex = 1,
_TestCircleComponent(Colors.red)..zIndex = 0,
],
);
await game.ensureAdd(canvas);
@ -66,15 +63,12 @@ void main() {
);
flameTester.testGameWidget(
'blue circle rendes behind red circle',
'blue circle renders behind red circle',
setUp: (game, tester) async {
final redSquare = _TestCircleComponent(Colors.red)..zIndex = 1;
final blueSquare = _TestCircleComponent(Colors.blue)..zIndex = 0;
final canvas = ZCanvasComponent(
children: [
blueSquare,
redSquare,
_TestCircleComponent(Colors.blue)..zIndex = 0,
_TestCircleComponent(Colors.red)..zIndex = 1
],
);
await game.ensureAdd(canvas);

Loading…
Cancel
Save