fn receiving_system(mut event_reader: EventReader<MyEvent>) {
    for my_event in event_reader.iter() {
        println!(
            "    Received message {:?}, with random value of {}",
            my_event.message, my_event.random_value
        );
    }
}
// This system listens for events of the type MyEvent
// If an event is received it will be printed to the console
This system listens for events of the type MyEvent
If an event is received it will be printed to the console
This system listens for events of the type MyEvent If an event is received it will be printed to the console
fn receiving_system(mut event_reader: EventReader<MyEvent>) {
    for my_event in event_reader.iter() {
        println!(
            "    Received message {:?}, with random value of {}",
            my_event.message, my_event.random_value
        );
    }
}
fn receiving_system ( mut event_reader : EventReader < MyEvent > ) { for my_event in event_reader . iter ( ) { println ! ( " " my_event message my_event random_value ) ; } }
This system listens for events of the type MyEvent
If an event is received it will be printed to the console
This system listens for events of the type MyEvent If an event is received it will be printed to the console
event_reader
EventReader<MyEvent>
event_reader
EventReader<MyEvent>