You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pinball/lib/game/components/multiballs/multiballs.dart

31 lines
903 B

feat: multiball asset (#235) * feat: multiball assets * feat: added multiball to components * feat: added controller for multiball * feat: positioned multiball and changed animation * feat: added sandbox for multiball * chore: unused import * refactor: add rotation to multiball constructor * test: coverage for multiball * chore: todos for refactor multiball childrens * test: removed unused mock * chore: removed unused imports * test: removed golden tests * refactor: changed assets and refactored multiball * refactor: changed assets and refactored multiball * test: tests for multiball * refactor: multiballs group refactored * chore: names and doc * refactor: removed duplicated images for multiball * refactor: changed multiball cubit and state * refactor: changed multiball and group * chore: positions of lights * refactor: changing blink behavior * test: blink behavior * refactor: blinking multiball lights * test: tests for blink behavior * chore: analysis errors * test: coverage for blinking * test: coverage * test: trying to fix tests * fix: fixed bloc error on behavior with tests * refactor: multiball blink * refactor: blinking behavior to TimerComponent and test coverage * refactor: modified blinking behavior * chore: error on merge tests * test: coverage multiballs * refactor: cleaned blink behavior * chore: unused import * Update packages/pinball_components/test/src/components/multiball/behaviors/multiball_blinking_behavior_test.dart Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> * Update packages/pinball_components/test/src/components/multiball/behaviors/multiball_blinking_behavior_test.dart Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> * Update test/game/components/multiballs/behaviors/multiballs_behavior_test.dart Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> * Update packages/pinball_components/test/src/components/multiball/multiball_test.dart Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com> * refactor: changed multiball states enum values * test: multiball descendant test at pinball Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>
3 years ago
import 'package:flame/components.dart';
import 'package:flutter/material.dart';
import 'package:pinball/game/components/multiballs/behaviors/behaviors.dart';
import 'package:pinball_components/pinball_components.dart';
import 'package:pinball_flame/pinball_flame.dart';
/// {@template multiballs_component}
/// A [SpriteGroupComponent] for the multiball over the board.
/// {@endtemplate}
class Multiballs extends Component with ZIndex {
/// {@macro multiballs_component}
Multiballs()
: super(
children: [
Multiball.a(),
Multiball.b(),
Multiball.c(),
Multiball.d(),
MultiballsBehavior(),
],
) {
zIndex = ZIndexes.decal;
}
/// Creates a [Multiballs] without any children.
///
/// This can be used for testing [Multiballs]'s behaviors in isolation.
@visibleForTesting
Multiballs.test();
}