chore: names and doc

pull/235/head
RuiAlonso 3 years ago
parent dee70426d5
commit 5fefe1291f

@ -9,7 +9,7 @@ import 'package:pinball_flame/pinball_flame.dart';
export 'cubit/multiball_cubit.dart'; export 'cubit/multiball_cubit.dart';
/// {@template multiball} /// {@template multiball}
/// A [Component] for the multiball over the board. /// A [Component] for the multiball lighting decals on the board.
/// {@endtemplate} /// {@endtemplate}
class Multiball extends Component { class Multiball extends Component {
/// {@macro multiball} /// {@macro multiball}
@ -117,8 +117,8 @@ class MultiballSpriteGroupComponent extends SpriteGroupComponent<MultiballState>
required String offAssetPath, required String offAssetPath,
required double rotation, required double rotation,
required MultiballState state, required MultiballState state,
}) : _onAssetPath = onAssetPath, }) : _litAssetPath = onAssetPath,
_offAssetPath = offAssetPath, _dimmedAssetPath = offAssetPath,
super( super(
anchor: Anchor.center, anchor: Anchor.center,
position: position, position: position,
@ -126,8 +126,8 @@ class MultiballSpriteGroupComponent extends SpriteGroupComponent<MultiballState>
current: state, current: state,
); );
final String _onAssetPath; final String _litAssetPath;
final String _offAssetPath; final String _dimmedAssetPath;
@override @override
Future<void> onLoad() async { Future<void> onLoad() async {
@ -135,8 +135,8 @@ class MultiballSpriteGroupComponent extends SpriteGroupComponent<MultiballState>
parent.bloc.stream.listen((state) => current = state); parent.bloc.stream.listen((state) => current = state);
final sprites = { final sprites = {
MultiballState.lit: Sprite(gameRef.images.fromCache(_onAssetPath)), MultiballState.lit: Sprite(gameRef.images.fromCache(_litAssetPath)),
MultiballState.dimmed: Sprite(gameRef.images.fromCache(_offAssetPath)), MultiballState.dimmed: Sprite(gameRef.images.fromCache(_dimmedAssetPath)),
}; };
this.sprites = sprites; this.sprites = sprites;

Loading…
Cancel
Save