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

            self.transition(trans, StateData { 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: Event) {
        let StateData { world, data } = data;
        if self.running {
            let trans = match self.state_stack.last_mut() {
                Some(state) => state.handle_event(StateData { world, data }, event),
                None => Trans::None,
            };
            self.transition(trans, StateData { world, data });
        }
    }
pub fn handle_event ( & mut self , data : StateData < T > , event : Event ) { let StateData { world , data } = data ; if self . running { let trans = match self . state_stack . last_mut ( ) { Some ( state ) => state . handle_event ( StateData { world , data } , event ) , None => Trans :: None , } ; self . transition ( trans , StateData { 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
Event
&mut self
data
StateData<T>
event
Event