bevy/examples/games
Rob Parrett 6701ad25db
Fix loading_screen example (#15845)
# Objective

Since #15641, `loading_screen` panics.

```
called `Result::unwrap()` on an `Err` value: MultipleEntities("bevy_ecs::query::state::QueryState<&mut bevy_render::view::visibility::Visibility, bevy_ecs::query::filter::With<loading_screen::LoadingScreen>>")
```

Before that PR, the camera did not have a `Visibility` component. But
`Visibility` is now a required component of `Camera`. So the query
matches multiple entities.

## Solution

Minimal change to make the example behave like it used to.

Plus a tiny drive-by cleanup to remove a redundant unwrap.

## Testing

`cargo run --example loading_screen`
2024-10-11 03:13:33 +00:00
..
alien_cake_addict.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
breakout.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
contributors.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
desk_toy.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
game_menu.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
loading_screen.rs Fix loading_screen example (#15845) 2024-10-11 03:13:33 +00:00
stepping.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00