From 35d72e0fe8a337cb2247ea382dddac7ddc3da161 Mon Sep 17 00:00:00 2001 From: Erick Date: Thu, 7 Apr 2022 14:43:00 -0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alejandro Santiago Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> --- .../pinball_components/lib/src/components/backboard.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/pinball_components/lib/src/components/backboard.dart b/packages/pinball_components/lib/src/components/backboard.dart index 6a4a3bcf..61ff6572 100644 --- a/packages/pinball_components/lib/src/components/backboard.dart +++ b/packages/pinball_components/lib/src/components/backboard.dart @@ -2,13 +2,15 @@ import 'package:flame/components.dart'; import 'package:pinball_components/pinball_components.dart'; /// {@template backboard} -/// The [Backboard] of the pinball machine +/// The [Backboard] of the pinball machine. /// {@endtemplate} class Backboard extends SpriteComponent with HasGameRef { /// {@macro backboard} Backboard({ required Vector2 position, }) : super( + // TODO(erickzanardo): remove multiply after + // https://github.com/flame-engine/flame/pull/1506 is merged position: position..clone().multiply(Vector2(1, -1)), anchor: Anchor.bottomCenter, ); @@ -18,7 +20,7 @@ class Backboard extends SpriteComponent with HasGameRef { await waitingMode(); } - /// Sets the Backboard on the waiting mode, where the scoreboard is show + /// Puts the Backboard in waiting mode, where the scoreboard is shown. Future waitingMode() async { size = Vector2(120, 100); sprite = await gameRef.loadSprite( @@ -26,7 +28,7 @@ class Backboard extends SpriteComponent with HasGameRef { ); } - /// Sets the Backboard on the game over mode, where the score input is show + /// Puts the Backboard in game over mode, where the score input is shown. Future gameOverMode() async { size = Vector2(100, 100); sprite = await gameRef.loadSprite(