diff --git a/lib/game/components/score_points.dart b/lib/game/components/score_points.dart index 543a855b..baf0db09 100644 --- a/lib/game/components/score_points.dart +++ b/lib/game/components/score_points.dart @@ -3,10 +3,16 @@ import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:pinball/game/game.dart'; +/// {@template score_points} +/// Specifies the amount of points received on [Ball] collision. +/// {@endtemplate} mixin ScorePoints { + /// {@macro score_points} int get points; } +/// [ContactCallback] that adds points to the score when a [Ball] collides with +/// a [BodyComponent] that implements [ScorePoints]. class BallScorePointsCallback extends ContactCallback { @override void begin(