diff --git a/packages/pinball_components/lib/src/components/spaceship.dart b/packages/pinball_components/lib/src/components/spaceship.dart index 8122e934..d753f639 100644 --- a/packages/pinball_components/lib/src/components/spaceship.dart +++ b/packages/pinball_components/lib/src/components/spaceship.dart @@ -188,6 +188,7 @@ class SpaceshipHole extends RampOpening { outsidePriority: outsidePriority, orientation: RampOrientation.up, ) { + renderBody = false; layer = Layer.spaceship; } diff --git a/packages/pinball_components/test/src/components/failures/spaceship_isolatedDiff.png b/packages/pinball_components/test/src/components/failures/spaceship_isolatedDiff.png deleted file mode 100644 index 86fe8c6a..00000000 Binary files a/packages/pinball_components/test/src/components/failures/spaceship_isolatedDiff.png and /dev/null differ diff --git a/packages/pinball_components/test/src/components/failures/spaceship_maskedDiff.png b/packages/pinball_components/test/src/components/failures/spaceship_maskedDiff.png deleted file mode 100644 index 8d64a796..00000000 Binary files a/packages/pinball_components/test/src/components/failures/spaceship_maskedDiff.png and /dev/null differ diff --git a/packages/pinball_components/test/src/components/failures/spaceship_masterImage.png b/packages/pinball_components/test/src/components/failures/spaceship_masterImage.png deleted file mode 100644 index da665718..00000000 Binary files a/packages/pinball_components/test/src/components/failures/spaceship_masterImage.png and /dev/null differ diff --git a/packages/pinball_components/test/src/components/failures/spaceship_testImage.png b/packages/pinball_components/test/src/components/failures/spaceship_testImage.png deleted file mode 100644 index 5e419c9c..00000000 Binary files a/packages/pinball_components/test/src/components/failures/spaceship_testImage.png and /dev/null differ diff --git a/packages/pinball_components/test/src/components/ramp_opening_test.dart b/packages/pinball_components/test/src/components/ramp_opening_test.dart index c49e9164..e0ea71e5 100644 --- a/packages/pinball_components/test/src/components/ramp_opening_test.dart +++ b/packages/pinball_components/test/src/components/ramp_opening_test.dart @@ -129,12 +129,10 @@ void main() { final callback = TestRampOpeningBallContactCallback(); when(() => ball.body).thenReturn(body); + when(() => ball.priority).thenReturn(1); when(() => body.position).thenReturn(Vector2.zero()); when(() => ball.layer).thenReturn(Layer.board); - await game.ready(); - await game.ensureAdd(area); - callback.begin(ball, area, MockContact()); verify(() => ball.layer = area.pathwayLayer).called(1); }); @@ -152,12 +150,10 @@ void main() { final callback = TestRampOpeningBallContactCallback(); when(() => ball.body).thenReturn(body); + when(() => ball.priority).thenReturn(1); when(() => body.position).thenReturn(Vector2.zero()); when(() => ball.layer).thenReturn(Layer.board); - await game.ready(); - await game.ensureAdd(area); - callback.begin(ball, area, MockContact()); verify(() => ball.layer = area.pathwayLayer).called(1); }); @@ -174,13 +170,11 @@ void main() { final callback = TestRampOpeningBallContactCallback(); when(() => ball.body).thenReturn(body); + when(() => ball.priority).thenReturn(1); when(() => body.position).thenReturn(Vector2.zero()); when(() => body.linearVelocity).thenReturn(Vector2(0, -1)); when(() => ball.layer).thenReturn(Layer.board); - await game.ready(); - await game.ensureAdd(area); - callback.begin(ball, area, MockContact()); verify(() => ball.layer = area.pathwayLayer).called(1); @@ -200,13 +194,11 @@ void main() { final callback = TestRampOpeningBallContactCallback(); when(() => ball.body).thenReturn(body); + when(() => ball.priority).thenReturn(1); when(() => body.position).thenReturn(Vector2.zero()); when(() => body.linearVelocity).thenReturn(Vector2(0, 1)); when(() => ball.layer).thenReturn(Layer.board); - await game.ready(); - await game.ensureAdd(area); - callback.begin(ball, area, MockContact()); verify(() => ball.layer = area.pathwayLayer).called(1); @@ -226,13 +218,11 @@ void main() { final callback = TestRampOpeningBallContactCallback(); when(() => ball.body).thenReturn(body); + when(() => ball.priority).thenReturn(1); when(() => body.position).thenReturn(Vector2.zero()); when(() => body.linearVelocity).thenReturn(Vector2(0, 1)); when(() => ball.layer).thenReturn(Layer.board); - await game.ready(); - await game.ensureAdd(area); - callback.begin(ball, area, MockContact()); verify(() => ball.layer = area.pathwayLayer).called(1); diff --git a/packages/pinball_components/test/src/components/spaceship_test.dart b/packages/pinball_components/test/src/components/spaceship_test.dart index 0a990d8f..50caa33c 100644 --- a/packages/pinball_components/test/src/components/spaceship_test.dart +++ b/packages/pinball_components/test/src/components/spaceship_test.dart @@ -73,6 +73,7 @@ void main() { group('SpaceshipHoleBallContactCallback', () { test('changes the ball priority on contact', () { + when(() => ball.priority).thenReturn(2); when(() => hole.outsideLayer).thenReturn(Layer.board); when(() => hole.outsidePriority).thenReturn(1);