Closed Joshix-1 closed 2 years ago
Your title has a typo. I think calling end_game more than once should be possible. If not every of the potentially hundreds of games needs to worry about that. If the GameManager just ignored those calls this problem is solved for good.
GameManager currently should ignore the calls
If it is called the second time it doesn't know the current game and returns early
Then why is this needed?
I don't know it. I just expierienced the bug, and that fixed it
Then why is this needed?
I don't know it. I just expierienced the bug, and that fixed it
Game:end_game -> GM:restart -> NewGame:Hallo -> OldGame:end_game -> OldGame:queue_free() Something like that.
There is interference between the pause menu and the end game menu.
fixed that. The end_game_menu doesn't display anymore after pressing restart in the pause menu
When closing the window I still get this error:
E 0:00:26.416 add_child: Parent node is busy setting up children, add_node() failed. Consider using call_deferred("add_child", child) instead.
<C++-Fehler> Condition "data.blocked > 0" is true.
<C++-Quellcode>scene/main/node.cpp:1135 @ add_child()
<Stacktrace> game_manager.gd:68 @ end_game()
game_manager.gd:29 @ _notification()
and it halts with this message:
Invalid set index 'text' (on base: 'Nil') with value of type 'String'.
The trace:
end_game_menu.gd:34 - at function: show
game_manager.gd:69 - at function: end_game
game_manager.gd:29 - at function: _notification
Should be fixed now too
Rebased all the changes and squashed them into one commit.
Description
I've added a better menu at the end of the games, that allows to restart or return to the menu.
Type of change
Environment
Please describe your environment and remove nonapplicable environment information from this section.
Testing
I played multiple games and looked at how the menu behaved.
Checklist