game states cleanup

This commit is contained in:
2026-09-19 11:32:24 +02:00
parent f2f3e5c76c
commit 05616061ed
5 changed files with 19 additions and 12 deletions
+7 -3
View File
@@ -35,10 +35,14 @@ fn spawn_depth_text(mut commands: Commands) {
));
}
// Update depth score texts
fn update_depth_text(depth: Res<Depth>, texts: Query<&mut Text, With<DepthText>>) {
// Update depth score text
fn update_depth_text(
mut commands: Commands,
depth: Res<Depth>,
texts: Query<&mut Text, With<DepthText>>,
) {
for mut text in texts {
text.0 = format!("Score: {}", (depth.0 / 100.0).floor());
text.0 = format!("Score: {}", depth.0);
}
}