File tree 1 file changed +7
-7
lines changed 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ fn main() {
9
9
}
10
10
11
11
enum Direction {
12
- UP ,
13
- DOWN ,
12
+ Up ,
13
+ Down ,
14
14
}
15
15
16
16
fn setup (
@@ -25,20 +25,20 @@ fn setup(
25
25
material : materials. add ( texture_handle. into ( ) ) ,
26
26
..Default :: default ( )
27
27
} )
28
- . insert ( Direction :: UP ) ;
28
+ . insert ( Direction :: Up ) ;
29
29
}
30
30
31
31
fn sprite_movement ( time : Res < Time > , mut sprite_position : Query < ( & mut Direction , & mut Transform ) > ) {
32
32
for ( mut logo, mut transform) in sprite_position. iter_mut ( ) {
33
33
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 ( ) ,
36
36
}
37
37
38
38
if transform. translation . y > 200. {
39
- * logo = Direction :: DOWN ;
39
+ * logo = Direction :: Down ;
40
40
} else if transform. translation . y < -200. {
41
- * logo = Direction :: UP ;
41
+ * logo = Direction :: Up ;
42
42
}
43
43
}
44
44
}
You can’t perform that action at this time.
0 commit comments