|
|
@ -11,8 +11,8 @@ mixin ScorePoints on BodyComponent {
|
|
|
|
int get points;
|
|
|
|
int get points;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// [ContactCallback] that adds points to the score when a [Ball] collides with
|
|
|
|
/// Adds points to the score when a [Ball] collides with a [BodyComponent] that
|
|
|
|
/// a [BodyComponent] that implements [ScorePoints].
|
|
|
|
/// implements [ScorePoints].
|
|
|
|
class BallScorePointsCallback extends ContactCallback<Ball, ScorePoints> {
|
|
|
|
class BallScorePointsCallback extends ContactCallback<Ball, ScorePoints> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void begin(
|
|
|
|
void begin(
|
|
|
|