Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example send_and_receive_events #11615

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples/ecs/send_and_receive_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ fn main() {
let mut app = App::new();
app.add_plugins(MinimalPlugins)
.add_event::<DebugEvent>()
.add_event::<A>()
.add_event::<B>()
.add_systems(Update, read_and_write_different_event_types)
.add_systems(
Update,
Expand Down Expand Up @@ -71,7 +73,7 @@ struct DebugEvent {

/// A system that sends all combinations of events.
fn send_events(mut events: EventWriter<DebugEvent>, frame_count: Res<FrameCount>) {
info!("Sending events for frame {:?}", *frame_count);
println!("Sending events for frame {:?}", *frame_count);
alice-i-cecile marked this conversation as resolved.
Show resolved Hide resolved

events.send(DebugEvent {
resend_from_param_set: false,
Expand Down Expand Up @@ -109,7 +111,7 @@ fn send_and_receive_param_set(
mut param_set: ParamSet<(EventReader<DebugEvent>, EventWriter<DebugEvent>)>,
frame_count: Res<FrameCount>,
) {
info!(
println!(
"Sending and receiving events for frame {} with a `ParamSet`",
frame_count.0
);
Expand Down Expand Up @@ -140,7 +142,7 @@ fn send_and_receive_manual_event_reader(
mut events: ResMut<Events<DebugEvent>>,
frame_count: Res<FrameCount>,
) {
info!(
println!(
"Sending and receiving events for frame {} with a `Local<ManualEventReader>",
frame_count.0
);
Expand Down