mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Fix breakout example scoreboard (#2770)
# Objective - The breakout scoreboard was not using the correct text section to display the score integer. ## Solution - This updates the code to use the correct text section.
This commit is contained in:
parent
321d998615
commit
ca54478569
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ fn ball_movement_system(mut ball_query: Query<(&Ball, &mut Transform)>) {
|
|||
|
||||
fn scoreboard_system(scoreboard: Res<Scoreboard>, mut query: Query<&mut Text>) {
|
||||
let mut text = query.single_mut().unwrap();
|
||||
text.sections[0].value = format!("Score: {}", scoreboard.score);
|
||||
text.sections[1].value = format!("{}", scoreboard.score);
|
||||
}
|
||||
|
||||
fn ball_collision_system(
|
||||
|
|
Loading…
Reference in a new issue