This is more of a design principles question based on the "Your First Game"/"Dodge the Creeps" tutorial from the official docs: https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html
The tutorial instructs us to call
get_tree().call_group('mobs', 'queue_free') in
Main.game_over, which causes the mobs to disappear as soon as the player gets hit. However, I thought it'd be nice to have the mobs continue to exist until the title screen reappears. I've done this by simply moving the same
queue_free call to
HUD.show_game_over after the timer, as shown below:
# Wait until the MessageTimer has counted down.
get_tree().call_group('mobs', 'queue_free') # Moved from Main.gd
$Message.text = 'Dodge the\nCreeps!'
# Make a one-shot timer and wait for it to finish.
This accomplishes what I want, and it does seem that one of the uses of
call_group is its ability to communicate between scenes. However, it feels intuitively wrong to have the
HUD scene responsible for removing non-HUD objects. Is my concern here valid, or is this a valid design practice in Godot?