|
|
@ -1,9 +1,10 @@
|
|
|
|
import 'package:flame/extensions.dart';
|
|
|
|
import 'dart:math' as math;
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flame_forge2d/flame_forge2d.dart';
|
|
|
|
import 'package:flame_forge2d/flame_forge2d.dart';
|
|
|
|
import 'package:pinball/game/game.dart';
|
|
|
|
import 'package:pinball/game/game.dart';
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template baseboard}
|
|
|
|
/// {@template baseboard}
|
|
|
|
/// TODO
|
|
|
|
/// Straight, angled board piece to corral the [Ball] towards the [Flipper]s.
|
|
|
|
/// {@endtemplate}
|
|
|
|
/// {@endtemplate}
|
|
|
|
class Baseboard extends BodyComponent {
|
|
|
|
class Baseboard extends BodyComponent {
|
|
|
|
/// {@macro baseboard}
|
|
|
|
/// {@macro baseboard}
|
|
|
@ -74,7 +75,7 @@ class Baseboard extends BodyComponent {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Body createBody() {
|
|
|
|
Body createBody() {
|
|
|
|
final angle = radians(27);
|
|
|
|
const angle = math.pi / 7;
|
|
|
|
|
|
|
|
|
|
|
|
final bodyDef = BodyDef()
|
|
|
|
final bodyDef = BodyDef()
|
|
|
|
..position = _position
|
|
|
|
..position = _position
|
|
|
|