pub fn just_wait_and_advance(mut state: ResMut<State<GameState>>, mut app_exit: ResMut<Events<AppExit>>, mut keys: ResMut<Events<KeyEvent>>, mut commands: Commands, mut scene_root: ResMut<Entity>) {
    if detect_keypress(&keys) {
        if let Some(next_stage) = state.current().next_state() {
            state.push(next_stage).unwrap();
            keys.update();
            simple_teardown(commands, scene_root);
        } else {
            app_exit.send(AppExit);
        }
    }
}
// Simple update function that most screens will use
Simple update function that most screens will use
Simple update function that most screens will use
pub fn just_wait_and_advance(mut state: ResMut<State<GameState>>, mut app_exit: ResMut<Events<AppExit>>, mut keys: ResMut<Events<KeyEvent>>, mut commands: Commands, mut scene_root: ResMut<Entity>) {
    if detect_keypress(&keys) {
        if let Some(next_stage) = state.current().next_state() {
            state.push(next_stage).unwrap();
            keys.update();
            simple_teardown(commands, scene_root);
        } else {
            app_exit.send(AppExit);
        }
    }
}
pub fn just_wait_and_advance ( mut state : ResMut < State < GameState > > , mut app_exit : ResMut < Events < AppExit > > , mut keys : ResMut < Events < KeyEvent > > , mut commands : Commands , mut scene_root : ResMut < Entity > ) { if detect_keypress ( & keys ) { if let Some ( next_stage ) = state . current ( ) . next_state ( ) { state . push ( next_stage ) . unwrap ( ) ; keys . update ( ) ; simple_teardown ( commands , scene_root ) ; } else { app_exit . send ( AppExit ) ; } } }
Simple update function that most screens will use
Simple update function that most screens will use
state
ResMut<State<GameState>>
app_exit
ResMut<Events<AppExit>>
keys
ResMut<Events<KeyEvent>>
commands
Commands
scene_root
ResMut<Entity>