From d9289fdd325ce7f190ce730a291bd3ce894b9c6c Mon Sep 17 00:00:00 2001 From: alestiago Date: Wed, 16 Mar 2022 09:39:58 +0000 Subject: [PATCH] feat: included SlingShot --- lib/game/components/board.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/game/components/board.dart b/lib/game/components/board.dart index 80db1711..674c3e43 100644 --- a/lib/game/components/board.dart +++ b/lib/game/components/board.dart @@ -6,7 +6,6 @@ import 'package:pinball/game/game.dart'; /// /// The bottom [Component]s are the [Flipper]s and the [Baseboard]s. /// {@endtemplate} -// TODO(alestiago): Add [SlingShot] once provided. // TODO(alestiago): Consider renaming once entire Board is defined. class BottomGroup extends Component { /// {@macro bottom_group} @@ -70,7 +69,15 @@ class _BottomGroupSide extends Component { Flipper.height, ), ); + final slingShot = SlingShot( + side: _side, + position: _position + + Vector2( + (Flipper.width) * direction, + Flipper.height + SlingShot.size.y, + ), + ); - await addAll([flipper, baseboard]); + await addAll([flipper, baseboard, slingShot]); } }