[][src]Trait amethyst_core::EventReader

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 World) { ... } }

Read events generically

Associated Types

type SystemData: SystemData<'a>

SystemData needed to read the event(s)

type Event: Clone + Send + Sync + 'static

The event type produced by the reader

Loading content...

Required methods

fn read(&mut self, _: Self::SystemData, _: &mut Vec<Self::Event>)

Read events from the linked SystemData and append to the given Vec

Loading content...

Provided methods

fn read_from_world(&mut self, world: &'a World, events: &mut Vec<Self::Event>)

Read events from World and append to the given Vec

fn setup(&mut self, res: &mut World)

Setup event reader

Loading content...

Implementors

Loading content...