pub fn handle_event(&mut self, data: StateData<'_, T>, event: E) {
        let StateData {
            context: state_manager,
            world,
            data,
        } = data;
        if self.running {
            let trans = match self.state_stack.last_mut() {
                Some(state) => state.handle_event(
                    StateData {
                        context: state_manager,
                        world,
                        data,
                    },
                    event,
                ),
                None => Trans::None,
            };

            self.transition(
                trans,
                StateData {
                    context: state_manager,
                    world,
                    data,
                },
            );
        }
    }
/// Passes a single event to the active state to handle.
Passes a single event to the active state to handle.
Passes a single event to the active state to handle .
pub fn handle_event(&mut self, data: StateData<'_, T>, event: E) {
        let StateData {
            context: state_manager,
            world,
            data,
        } = data;
        if self.running {
            let trans = match self.state_stack.last_mut() {
                Some(state) => state.handle_event(
                    StateData {
                        context: state_manager,
                        world,
                        data,
                    },
                    event,
                ),
                None => Trans::None,
            };
            self.transition(
                trans,
                StateData {
                    context: state_manager,
                    world,
                    data,
                },
            );
        }
    }
pub fn handle_event ( & mut self , data : StateData < ' _ , T > , event : E ) { let StateData { context : state_manager , world , data , } = data ; if self . running { let trans = match self . state_stack . last_mut ( ) { Some ( state ) => state . handle_event ( StateData { context : state_manager , world , data , } , event , ) , None => Trans :: None , } ; self . transition ( trans , StateData { context : state_manager , world , data , } , ) ; } }
Passes a single event to the active state to handle.
Passes a single event to the active state to handle .
&mut self
data
StateData<'_, T>
event
E
&mut self
data
StateData<'_, T>
event
E