docs: documented wall.dart

pull/29/head
alestiago 4 years ago
parent 7dcece3b3b
commit c21cad8334

@ -6,13 +6,18 @@ import 'package:pinball/game/components/components.dart';
/// {@template wall} /// {@template wall}
/// A continuos generic and [BodyType.static] barrier that divides a game area. /// A continuos generic and [BodyType.static] barrier that divides a game area.
/// {@endtemplate} /// {@endtemplate}
// TODO(alestiago): Remove [Wall] for [Pathway.straight].
class Wall extends BodyComponent { class Wall extends BodyComponent {
/// {@macro wall}
Wall({ Wall({
required this.start, required this.start,
required this.end, required this.end,
}); });
/// The [start] of the wall.
final Vector2 start; final Vector2 start;
/// The [end] of the wall.
final Vector2 end; final Vector2 end;
@override @override
@ -39,6 +44,7 @@ class Wall extends BodyComponent {
/// [BottomWallBallContactCallback]. /// [BottomWallBallContactCallback].
/// {@endtemplate} /// {@endtemplate}
class BottomWall extends Wall { class BottomWall extends Wall {
/// {@macro bottom_wall}
BottomWall(Forge2DGame game) BottomWall(Forge2DGame game)
: super( : super(
start: game.screenToWorld(game.camera.viewport.effectiveSize), start: game.screenToWorld(game.camera.viewport.effectiveSize),

Loading…
Cancel
Save