|
|
@ -17,11 +17,11 @@ class FlutterForestBonusBehavior extends Component
|
|
|
|
// merged:
|
|
|
|
// merged:
|
|
|
|
// https://github.com/flame-engine/flame/pull/1538
|
|
|
|
// https://github.com/flame-engine/flame/pull/1538
|
|
|
|
bumper.bloc.stream.listen((state) {
|
|
|
|
bumper.bloc.stream.listen((state) {
|
|
|
|
final hasBonus = bumpers.every(
|
|
|
|
final achievedBonus = bumpers.every(
|
|
|
|
(bumper) => bumper.bloc.state == DashNestBumperState.active,
|
|
|
|
(bumper) => bumper.bloc.state == DashNestBumperState.active,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (hasBonus) {
|
|
|
|
if (achievedBonus) {
|
|
|
|
gameRef
|
|
|
|
gameRef
|
|
|
|
.read<GameBloc>()
|
|
|
|
.read<GameBloc>()
|
|
|
|
.add(const BonusActivated(GameBonus.dashNest));
|
|
|
|
.add(const BonusActivated(GameBonus.dashNest));
|
|
|
|