diff --git a/src/title_screen.rs b/src/title_screen.rs index 8299d1c..2669f7f 100644 --- a/src/title_screen.rs +++ b/src/title_screen.rs @@ -38,6 +38,11 @@ fn spawn_menu(mut commands: Commands) { }); } -fn despawn_menu() { - todo!(); +fn despawn_menu( + mut commands: Commands, + to_despawn: Query>, +) { + for entity in &to_despawn { + commands.entity(entity).despawn(); + } }