|
|
@ -13,6 +13,9 @@ class FlutterForestBonusBehavior extends Component
|
|
|
|
|
|
|
|
|
|
|
|
final bumpers = parent.children.whereType<DashNestBumper>();
|
|
|
|
final bumpers = parent.children.whereType<DashNestBumper>();
|
|
|
|
for (final bumper in bumpers) {
|
|
|
|
for (final bumper in bumpers) {
|
|
|
|
|
|
|
|
// TODO(alestiago): Refactor subscription management once the following is
|
|
|
|
|
|
|
|
// merged:
|
|
|
|
|
|
|
|
// https://github.com/flame-engine/flame/pull/1538
|
|
|
|
bumper.bloc.stream.listen((state) {
|
|
|
|
bumper.bloc.stream.listen((state) {
|
|
|
|
final hasBonus = bumpers.every(
|
|
|
|
final hasBonus = bumpers.every(
|
|
|
|
(bumper) => bumper.bloc.state == DashNestBumperState.active,
|
|
|
|
(bumper) => bumper.bloc.state == DashNestBumperState.active,
|
|
|
|