fix menu not getting updated after toggling settings
This commit is contained in:
parent
f57a1220d6
commit
86734fdc72
|
@ -64,7 +64,7 @@ impl Turn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_game_event(
|
pub fn handle_game_event(
|
||||||
mut settings: ResMut<Settings>,
|
mut settings: ResMut<Settings>,
|
||||||
mut er_game: EventReader<GameEvent>,
|
mut er_game: EventReader<GameEvent>,
|
||||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||||
|
|
|
@ -22,7 +22,9 @@ impl Plugin for MenuPlugin {
|
||||||
app.add_systems(Startup, setup.after(hud::setup));
|
app.add_systems(Startup, setup.after(hud::setup));
|
||||||
app.add_systems(PreUpdate, show_deathscreen.run_if(on_event::<DeathScreenEvent>()));
|
app.add_systems(PreUpdate, show_deathscreen.run_if(on_event::<DeathScreenEvent>()));
|
||||||
app.add_systems(Update, handle_deathscreen_input);
|
app.add_systems(Update, handle_deathscreen_input);
|
||||||
app.add_systems(PreUpdate, update_menu.run_if(on_event::<UpdateMenuEvent>()));
|
app.add_systems(PreUpdate, update_menu
|
||||||
|
.after(game::handle_game_event)
|
||||||
|
.run_if(on_event::<UpdateMenuEvent>()));
|
||||||
app.add_systems(Update, handle_input.run_if(alive));
|
app.add_systems(Update, handle_input.run_if(alive));
|
||||||
app.insert_resource(DeathScreenInputDelayTimer(
|
app.insert_resource(DeathScreenInputDelayTimer(
|
||||||
Timer::from_seconds(1.0, TimerMode::Once)));
|
Timer::from_seconds(1.0, TimerMode::Once)));
|
||||||
|
|
Loading…
Reference in a new issue