amethyst / evoli

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

Add a menu screen #48 #82

Closed chrispetkau closed 5 years ago

chrispetkau commented 5 years ago

https://github.com/amethyst/evoli/issues/48

Added menu.rs, the menu state. Added UiPrefab loading to prefabs.rs. UiPrefab loading happens at the same time as main game assets. Modified state flow to go from loading to menu to main_game. Added resources/prefabs/ui/menu.ron, the menu prefab asset.

marotili commented 5 years ago

Hey, thanks for this :) I tested it, but I get an error: thread 'main' panicked at 'Tried to fetch a resource, but the resource does not exist. Any idea what the problem could be?

For faster iteration, we should add a command line flag or something similar so that we can skip the menu state and start the game directly. Would you be interested in adding something like that?

chrispetkau commented 5 years ago

Error was caused by incorrect method of accessing UiFinder. I thought I was just comitting that change to my fork of evoli. I didn't know it would automatically propagate into this pull request. Github noob. At any rate, it's fixed now.

I'll work on adding a command line flag to skip through the main menu next, and add a button to the in-game ui to return to it.