diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index bb143f13..8c87d33f 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -81,11 +81,11 @@ class PinballGame extends Forge2DGame @override void onTapDown(TapDownInfo info) { if (info.raw.kind == PointerDeviceKind.touch) { - final rocket = descendants().whereType().first; + final rocket = children.whereType().first; final bounds = rocket.topLeftPosition & rocket.size; if (bounds.contains(info.eventPosition.game.toOffset())) { - descendants().whereType().first.pull(); + children.whereType().first.pull(); } else { final leftSide = info.eventPosition.widget.x < canvasSize.x / 2; boardSideActive = leftSide ? BoardSide.left : BoardSide.right; @@ -108,7 +108,7 @@ class PinballGame extends Forge2DGame final bounds = rocket.topLeftPosition & rocket.size; if (bounds.contains(info.eventPosition.game.toOffset())) { - descendants().whereType().first.release(); + children.whereType().first.release(); } else { _moveFlippersDown(); } @@ -117,7 +117,7 @@ class PinballGame extends Forge2DGame @override void onTapCancel() { - descendants().whereType().first.release(); + children.whereType().first.release(); _moveFlippersDown(); super.onTapCancel();