game states cleanup
This commit is contained in:
+3
-7
@@ -35,14 +35,10 @@ fn spawn_depth_text(mut commands: Commands) {
|
||||
));
|
||||
}
|
||||
|
||||
// Update depth score text
|
||||
fn update_depth_text(
|
||||
mut commands: Commands,
|
||||
depth: Res<Depth>,
|
||||
texts: Query<&mut Text, With<DepthText>>,
|
||||
) {
|
||||
// Update depth score texts
|
||||
fn update_depth_text(depth: Res<Depth>, texts: Query<&mut Text, With<DepthText>>) {
|
||||
for mut text in texts {
|
||||
text.0 = format!("Score: {}", depth.0);
|
||||
text.0 = format!("Score: {}", (depth.0 / 100.0).floor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user