Skip to content

Commit de51062

Browse files
committed
fix formating again
1 parent 4319d5b commit de51062

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/2d/move_sprite.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ fn main() {
99
}
1010

1111
enum Direction {
12-
UP,
13-
DOWN,
12+
Up,
13+
Down,
1414
}
1515

1616
fn setup(
@@ -25,20 +25,20 @@ fn setup(
2525
material: materials.add(texture_handle.into()),
2626
..Default::default()
2727
})
28-
.insert(Direction::UP);
28+
.insert(Direction::Up);
2929
}
3030

3131
fn sprite_movement(time: Res<Time>, mut sprite_position: Query<(&mut Direction, &mut Transform)>) {
3232
for (mut logo, mut transform) in sprite_position.iter_mut() {
3333
match *logo {
34-
Direction::UP => transform.translation.y += 150. * time.delta_seconds(),
35-
Direction::DOWN => transform.translation.y -= 150. * time.delta_seconds(),
34+
Direction::Up => transform.translation.y += 150. * time.delta_seconds(),
35+
Direction::Down => transform.translation.y -= 150. * time.delta_seconds(),
3636
}
3737

3838
if transform.translation.y > 200. {
39-
*logo = Direction::DOWN;
39+
*logo = Direction::Down;
4040
} else if transform.translation.y < -200. {
41-
*logo = Direction::UP;
41+
*logo = Direction::Up;
4242
}
4343
}
4444
}

0 commit comments

Comments
 (0)