@@ -46,15 +46,16 @@ const COL_SELECTED: Color = Color::rgb_linear(5.0, 5.0, 5.0);
46
46
const SHOWCASE_TIMER_SECS : f32 = 3.0 ;
47
47
48
48
fn setup (
49
- mut cmd : Commands ,
49
+ commands : & mut Commands ,
50
50
asset_server : Res < AssetServer > ,
51
51
mut materials : ResMut < Assets < ColorMaterial > > ,
52
52
) {
53
53
let contribs = contributors ( ) ;
54
54
55
55
let texture_handle = asset_server. load ( "branding/icon.png" ) ;
56
56
57
- cmd. spawn ( Camera2dComponents :: default ( ) )
57
+ commands
58
+ . spawn ( Camera2dComponents :: default ( ) )
58
59
. spawn ( UiCameraComponents :: default ( ) ) ;
59
60
60
61
let mut sel = ContributorSelection {
@@ -76,7 +77,8 @@ fn setup(
76
77
let mut transform = Transform :: from_translation ( Vec3 :: new ( pos. 0 , pos. 1 , 0.0 ) ) ;
77
78
* transform. scale . x_mut ( ) *= if flipped { -1.0 } else { 1.0 } ;
78
79
79
- cmd. spawn ( ( Contributor { color : col } , ) )
80
+ commands
81
+ . spawn ( ( Contributor { color : col } , ) )
80
82
. with ( Velocity {
81
83
translation : velocity,
82
84
rotation : -dir * 5.0 ,
@@ -94,16 +96,17 @@ fn setup(
94
96
} )
95
97
. with ( transform) ;
96
98
97
- let e = cmd . current_entity ( ) . unwrap ( ) ;
99
+ let e = commands . current_entity ( ) . unwrap ( ) ;
98
100
99
101
sel. order . push ( ( name, e) ) ;
100
102
}
101
103
102
104
sel. order . shuffle ( & mut rnd) ;
103
105
104
- cmd . spawn ( ( SelectTimer , Timer :: from_seconds ( SHOWCASE_TIMER_SECS , true ) ) ) ;
106
+ commands . spawn ( ( SelectTimer , Timer :: from_seconds ( SHOWCASE_TIMER_SECS , true ) ) ) ;
105
107
106
- cmd. spawn ( ( ContributorDisplay , ) )
108
+ commands
109
+ . spawn ( ( ContributorDisplay , ) )
107
110
. with_bundle ( TextComponents {
108
111
style : Style {
109
112
align_self : AlignSelf :: FlexEnd ,
@@ -120,7 +123,7 @@ fn setup(
120
123
..Default :: default ( )
121
124
} ) ;
122
125
123
- cmd . insert_resource ( sel) ;
126
+ commands . insert_resource ( sel) ;
124
127
}
125
128
126
129
/// Finds the next contributor to display and selects the entity
0 commit comments