From 83bf70458f30a553d92e69601deced33ee849022 Mon Sep 17 00:00:00 2001 From: alestiago Date: Thu, 21 Apr 2022 17:38:29 +0100 Subject: [PATCH] refactor: renamed ContactCallback --- lib/game/components/controlled_sparky_computer.dart | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/game/components/controlled_sparky_computer.dart b/lib/game/components/controlled_sparky_computer.dart index b1945c25..0403fad8 100644 --- a/lib/game/components/controlled_sparky_computer.dart +++ b/lib/game/components/controlled_sparky_computer.dart @@ -20,7 +20,7 @@ class ControlledSparkyComputer extends SparkyComputer @override Future onLoad() async { await super.onLoad(); - gameRef.addContactCallback(SparkyTurboChargeSensorBallContactCallback()); + gameRef.addContactCallback(SparkyComputerSensorBallContactCallback()); } } @@ -40,17 +40,13 @@ class SparkyComputerController /// Turbo charges the [Ball] when it enters the [SparkyComputer] /// {@endtemplate} @visibleForTesting -class SparkyTurboChargeSensorBallContactCallback +class SparkyComputerSensorBallContactCallback extends ContactCallback { /// {@macro sparky_turbo_charge_sensor_ball_contact_callback} - SparkyTurboChargeSensorBallContactCallback(); + SparkyComputerSensorBallContactCallback(); @override - void begin( - SparkyComputerSensor sparkyTurboChargeSensor, - ControlledBall ball, - _, - ) { + void begin(_, ControlledBall ball, __) { ball.controller.turboCharge(); } }