From 9dce9949cd796992955d46e05249fdca41201bdd Mon Sep 17 00:00:00 2001 From: Allison Ryan Date: Mon, 2 May 2022 12:46:29 -0500 Subject: [PATCH] chore: add animatronic to spaceship sandbox --- .../components/android_spaceship/android_spaceship.dart | 5 ++++- .../stories/android_acres/android_spaceship_game.dart | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart b/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart index e7658856..b5732c7c 100644 --- a/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart +++ b/packages/pinball_components/lib/src/components/android_spaceship/android_spaceship.dart @@ -157,7 +157,10 @@ class _LightBeamSpriteComponent extends SpriteComponent class AndroidSpaceshipEntrance extends BodyComponent with ParentIsA, Layered { AndroidSpaceshipEntrance({Iterable? children}) - : super(children: children) { + : super( + children: children, + renderBody: false, + ) { layer = Layer.spaceship; } diff --git a/packages/pinball_components/sandbox/lib/stories/android_acres/android_spaceship_game.dart b/packages/pinball_components/sandbox/lib/stories/android_acres/android_spaceship_game.dart index 6799ef29..976f4894 100644 --- a/packages/pinball_components/sandbox/lib/stories/android_acres/android_spaceship_game.dart +++ b/packages/pinball_components/sandbox/lib/stories/android_acres/android_spaceship_game.dart @@ -17,7 +17,7 @@ class AndroidSpaceshipGame extends BallGame { ); static const description = ''' - Shows how the AndroidSpaceship is rendered. + Shows how the AndroidSpaceship and AndroidAnimatronic are rendered. - Activate the "trace" parameter to overlay the body. - Tap anywhere on the screen to spawn a Ball into the game. @@ -28,8 +28,11 @@ class AndroidSpaceshipGame extends BallGame { await super.onLoad(); camera.followVector2(Vector2.zero()); - await add( - AndroidSpaceship(position: Vector2.zero()), + await addAll( + [ + AndroidSpaceship(position: Vector2.zero()), + AndroidAnimatronic(), + ], ); await traceAllBodies();