/// Cleans up the [GameUI] components by despawning them
Cleans up the [GameUI] components by despawning them
Cleans up the [ GameUI ] components by despawning them
fn cleanup_ui(
    mut commands: Commands,
    ui_query: Query<
        Entity,
        Or<(
            With<GameUI>,
            With<GameOver>,
            With<GameTimer>,
            With<BackButton>,
            With<UICamera>,
        )>,
    >,
) {
    for entity in ui_query.iter() {
        commands.entity(entity).despawn_recursive();
    }
}
fn cleanup_ui ( mut commands : Commands , ui_query : Query < Entity , Or < ( With < GameUI > , With < GameOver > , With < GameTimer > , With < BackButton > , With < UICamera > , ) > , > , ) { for entity in ui_query . iter ( ) { commands . entity ( entity ) . despawn_recursive ( ) ; } }
Cleans up the [GameUI] components by despawning them
Cleans up the [ GameUI ] components by despawning them
commands
Commands
ui_query
Query<
        Entity,
        Or<(
            With<GameUI>,
            With<GameOver>,
            With<GameTimer>,
            With<BackButton>,
            With<UICamera>,
        )>,
    >