Trait amethyst_core::EventReader
source · pub trait EventReader<'a> {
type SystemData: SystemData<'a>;
type Event: Clone + Send + Sync + 'static;
fn read(&mut self, _: Self::SystemData, _: &mut Vec<Self::Event>);
fn read_from_world(&mut self, world: &'a World, events: &mut Vec<Self::Event>) { ... }
fn setup(&mut self, res: &mut Resources) { ... }
}
Expand description
Read events generically
Required Associated Types
sourcetype SystemData: SystemData<'a>
type SystemData: SystemData<'a>
SystemData needed to read the event(s)
Required Methods
sourcefn read(&mut self, _: Self::SystemData, _: &mut Vec<Self::Event>)
fn read(&mut self, _: Self::SystemData, _: &mut Vec<Self::Event>)
Read events from the linked SystemData
and append to the given Vec
Provided Methods
sourcefn read_from_world(&mut self, world: &'a World, events: &mut Vec<Self::Event>)
fn read_from_world(&mut self, world: &'a World, events: &mut Vec<Self::Event>)
Read events from World
and append to the given Vec