Closed chrispetkau closed 5 years ago
Went ahead and implemented issue #50. Put a prefab in for the main game ui and replaced the specific time_control.rs with a more generic main_game_ui.rs. Added CreatureTag component which is added to every entity created by the creature spawner system; all such entities are deleted when we transition from the MainGameState back to the MenuState.
Hm. I will stop editing the same comment and just append new ones. This PR is ready to go. Transitions between MainGameState and MenuState properly terminate and restart the MainGameState.
One known issue: If the main game is paused, the Menu button won't return you to the main menu.
Thanks a bunch! @khskarl will have time for code review this weekend.
Looking into augmenting the in-game menu to support going back to the main menu, I refactored time_control.rs to improve my understanding and improve maintainability.