Implement the main menu despawn function

This commit is contained in:
2025-07-27 10:33:53 -05:00
parent 9a2381249f
commit 7123192271

View File

@@ -38,6 +38,11 @@ fn spawn_menu(mut commands: Commands) {
});
}
fn despawn_menu() {
todo!();
fn despawn_menu(
mut commands: Commands,
to_despawn: Query<Entity, With<TitleUI>>,
) {
for entity in &to_despawn {
commands.entity(entity).despawn();
}
}