game states cleanup
This commit is contained in:
+2
-6
@@ -36,13 +36,9 @@ fn spawn_depth_text(mut commands: Commands) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update depth score text
|
// Update depth score text
|
||||||
fn update_depth_text(
|
fn update_depth_text(depth: Res<Depth>, texts: Query<&mut Text, With<DepthText>>) {
|
||||||
mut commands: Commands,
|
|
||||||
depth: Res<Depth>,
|
|
||||||
texts: Query<&mut Text, With<DepthText>>,
|
|
||||||
) {
|
|
||||||
for mut text in texts {
|
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