pub(crate) fn stop(&mut self, data: StateData<'_, T>) {
        if self.running {
            let StateData {
                context: state_manager,
                world,
                data,
            } = data;
            while let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            }

            self.running = false;
        }
    }
/// Shuts the state machine down.
Shuts the state machine down.
Shuts the state machine down .
pub(crate) fn stop(&mut self, data: StateData<'_, T>) {
        if self.running {
            let StateData {
                context: state_manager,
                world,
                data,
            } = data;
            while let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            }
            self.running = false;
        }
    }
pub ( crate ) fn stop ( & mut self , data : StateData < ' _ , T > ) { if self . running { let StateData { context : state_manager , world , data , } = data ; while let Some ( mut state ) = self . state_stack . pop ( ) { state . on_stop ( StateData { context : state_manager , world , data , } ) ; } self . running = false ; } }
Shuts the state machine down.
Shuts the state machine down .
&mut self
data
StateData<'_, T>
&mut self
data
StateData<'_, T>