pub(crate) fn stop(&mut self, data: StateData<T>) {
        if self.running {
            let StateData { world, data } = data;
            while let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData { 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 { world, data } = data;
            while let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData { world, data });
            }
            self.running = false;
        }
    }
pub ( crate ) fn stop ( & mut self , data : StateData < T > ) { if self . running { let StateData { world , data } = data ; while let Some ( mut state ) = self . state_stack . pop ( ) { state . on_stop ( StateData { 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>