Commit 7a7deb22 authored by Rahix's avatar Rahix 🦀 Committed by neosam
Browse files

main_menu: Skip menu in debug builds

Go directly to heaven when building with `wasm-pack build --dev`.
parent 4a386c37
......@@ -21,7 +21,14 @@ impl gamestate::State for MainMenuState {
.style()
.set_property("display", "block")
.unwrap();
gamestate::Transition::Sleep
// In debug builds, skip the main menu and go straight to heaven. This eases iterative
// development because one does not need to click "Play Game" every time ...
if cfg!(debug_assertions) {
gamestate::Transition::push(states::HeavenState::new(None))
} else {
gamestate::Transition::Sleep
}
}
fn deinit(&mut self) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment