mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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:
parent
d47bb3e6e9
commit
4805e48da9
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue