refactor: renamed controller

pull/111/head
alestiago 4 years ago
parent bcbdde766d
commit 2d38697a25

@ -23,7 +23,7 @@ class ControlledBall extends Ball with Controls<BallController> {
plunger.body.position.x, plunger.body.position.x,
plunger.body.position.y + Ball.size.y, plunger.body.position.y + Ball.size.y,
); );
controller = PlungerBallController(this); controller = LaunchedBallController(this);
} }
/// {@template bonus_ball} /// {@template bonus_ball}
@ -50,8 +50,7 @@ class BallController extends ComponentController<Ball> {
/// {@macro ball_controller} /// {@macro ball_controller}
BallController(Ball ball) : super(ball); BallController(Ball ball) : super(ball);
/// Removes the [Ball] from a [PinballGame]; spawning a new [Ball] if /// Removes the [Ball] from a [PinballGame].
/// any are left.
/// ///
/// {@template ball_controller_lost} /// {@template ball_controller_lost}
/// Triggered by [BottomWallBallContactCallback] when the [Ball] falls into /// Triggered by [BottomWallBallContactCallback] when the [Ball] falls into
@ -63,10 +62,10 @@ class BallController extends ComponentController<Ball> {
} }
/// {@macro ball_controller} /// {@macro ball_controller}
class PlungerBallController extends BallController class LaunchedBallController extends BallController
with HasGameRef<PinballGame> { with HasGameRef<PinballGame> {
/// {@macro ball_controller} /// {@macro ball_controller}
PlungerBallController(Ball<Forge2DGame> ball) : super(ball); LaunchedBallController(Ball<Forge2DGame> ball) : super(ball);
@override @override

Loading…
Cancel
Save