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:
Caleb Boylan 2021-09-04 18:52:10 +00:00
parent 321d998615
commit ca54478569

View file

@ -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(