From 9587a4fe7792577fae6823c8c56ee2e62ccc0869 Mon Sep 17 00:00:00 2001 From: Erick Zanardo Date: Mon, 7 Mar 2022 14:50:01 -0300 Subject: [PATCH] docs: adding dart docs to the wall component --- lib/game/components/wall.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/game/components/wall.dart b/lib/game/components/wall.dart index 7bf58273..8e359f20 100644 --- a/lib/game/components/wall.dart +++ b/lib/game/components/wall.dart @@ -3,6 +3,12 @@ import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:pinball/game/components/components.dart'; +/// {@template wall} +/// +/// A generic wall component, a static component that can +/// be used to create more complex structures. +/// +/// {@endtemplate} class Wall extends BodyComponent { Wall({ required this.start, @@ -29,6 +35,12 @@ class Wall extends BodyComponent { } } +/// {@template bottom_wall} +/// +/// An specifc [Wall] used to create bottom boundary of the +/// game board +/// +/// {@endtemplate} class BottomWall extends Wall { BottomWall(Forge2DGame game) : super( @@ -40,6 +52,12 @@ class BottomWall extends Wall { ); } +/// {@template bottom_wall_ball_contact_callback} +/// +/// The [ContactCallback] responsible for indentifying when a [Ball] +/// has fall into the bottom of the board +/// +/// {@endtemplate} class BottomWallBallContactCallback extends ContactCallback { @override void begin(Ball ball, BottomWall wall, Contact contact) {