Skip to content

Commit 1e08e27

Browse files
committed
Fix dart format
1 parent 06c8208 commit 1e08e27

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

lib/game/actors/enemy.dart

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@ class Enemy extends SpriteComponent
2020
super.anchor,
2121
super.priority,
2222
}) : super.fromImage(
23-
srcPosition: Vector2(1 * 32, 0),
24-
srcSize: Vector2.all(32),
25-
position: position,
26-
) {
23+
srcPosition: Vector2(1 * 32, 0),
24+
srcSize: Vector2.all(32),
25+
position: position,
26+
) {
2727
if (targetPosition != null && position != null) {
2828
// Need to sequence two move to effects so that we can
2929
// tap into the onFinishCallback and flip the component.
30-
final effect = SequenceEffect(
31-
[
32-
MoveToEffect(
33-
targetPosition,
34-
EffectController(speed: 100),
35-
onComplete: flipHorizontallyAroundCenter,
36-
),
37-
MoveToEffect(
38-
position + Vector2(32, 0), // Need to offset by 32 due to flip
39-
EffectController(speed: 100),
40-
onComplete: flipHorizontallyAroundCenter,
41-
),
42-
],
43-
infinite: true,
44-
);
30+
final effect = SequenceEffect([
31+
MoveToEffect(
32+
targetPosition,
33+
EffectController(speed: 100),
34+
onComplete: flipHorizontallyAroundCenter,
35+
),
36+
MoveToEffect(
37+
position + Vector2(32, 0), // Need to offset by 32 due to flip
38+
EffectController(speed: 100),
39+
onComplete: flipHorizontallyAroundCenter,
40+
),
41+
],
42+
infinite: true,
43+
);
4544

4645
add(effect);
4746
}

0 commit comments

Comments
 (0)