docs: inclduded documentation

pull/89/head
alestiago 4 years ago
parent bd0484ae38
commit 183b0dc9ce

@ -60,19 +60,23 @@ class FlutterForest extends Component
} }
/// {@template dash_nest_bumper} /// {@template dash_nest_bumper}
/// Body that repels a [Ball] on contact. /// Bumper located in the [FlutterForest].
///
/// When hit, the [GameState.score] is increased.
/// {@endtemplate} /// {@endtemplate}
@visibleForTesting @visibleForTesting
abstract class DashNestBumper extends BodyComponent<PinballGame> abstract class DashNestBumper extends BodyComponent<PinballGame>
with ScorePoints, InitialPosition { with ScorePoints, InitialPosition {
/// {@template dash_nest_bumper} /// {@macro dash_nest_bumper}
DashNestBumper({required this.id}); DashNestBumper({required this.id});
/// Unique identifier for this [DashNestBumper].
///
/// Used to identify [DashNestBumper]s in [GameState.activatedDashNests].
final String id; final String id;
} }
/// {@template bottom_wall_ball_contact_callback}
/// Listens when a [Ball] falls bounces against a [DashNestBumper].
/// {@endtemplate}
@visibleForTesting @visibleForTesting
class DashNestBumperBallContactCallback class DashNestBumperBallContactCallback
extends ContactCallback<DashNestBumper, Ball> { extends ContactCallback<DashNestBumper, Ball> {
@ -84,8 +88,10 @@ class DashNestBumperBallContactCallback
} }
} }
/// {@macro dash_nest_bumper}
@visibleForTesting @visibleForTesting
class BigDashNestBumper extends DashNestBumper { class BigDashNestBumper extends DashNestBumper {
/// {@macro dash_nest_bumper}
BigDashNestBumper({required String id}) : super(id: id); BigDashNestBumper({required String id}) : super(id: id);
@override @override
@ -105,8 +111,10 @@ class BigDashNestBumper extends DashNestBumper {
} }
} }
/// {@macro dash_nest_bumper}
@visibleForTesting @visibleForTesting
class SmallDashNestBumper extends DashNestBumper { class SmallDashNestBumper extends DashNestBumper {
/// {@macro dash_nest_bumper}
SmallDashNestBumper({required String id}) : super(id: id); SmallDashNestBumper({required String id}) : super(id: id);
@override @override

Loading…
Cancel
Save