Alien Cake Addict example: don't exit when player lose (#8388)

# Objective

- Example Alien Cake Addict exit when the player lose, it's not supposed
to

## Solution

- Don't despawn the window

---------

Co-authored-by: ira <JustTheCoolDude@gmail.com>
This commit is contained in:
François 2023-04-14 21:38:34 +02:00 committed by GitHub
parent d47bb3e6e9
commit 4805e48da9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,8 +182,8 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>, mut game: ResMu
);
}
// remove all entities that are not a camera
fn teardown(mut commands: Commands, entities: Query<Entity, Without<Camera>>) {
// remove all entities that are not a camera or window
fn teardown(mut commands: Commands, entities: Query<Entity, (Without<Camera>, Without<Window>)>) {
for entity in &entities {
commands.entity(entity).despawn();
}