amethyst / evoli

An ecosystem-simulation game made with Amethyst
https://community.amethyst.rs/t/evoli-introduction/770
Other
217 stars 33 forks source link

Issue #50, add Menu button to in-game UI. #84

Closed chrispetkau closed 5 years ago

chrispetkau commented 5 years ago

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.

chrispetkau commented 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.

chrispetkau commented 5 years ago

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.

chrispetkau commented 5 years ago

One known issue: If the main game is paused, the Menu button won't return you to the main menu.

erlend-sh commented 5 years ago

Thanks a bunch! @khskarl will have time for code review this weekend.