docs: use read instead of deprecated iter (#10376)
https://docs.rs/bevy/latest/bevy/ecs/event/struct.EventReader.html#method.iter # Objective - Remove doc example using deprecated `EventReader.iter` method ## Solution - Update docs to use `read` instead of `iter`
This commit is contained in:
parent
1bd1c25b1a
commit
32a5c7db35
@ -119,7 +119,7 @@ use bevy_utils::Duration;
|
||||
/// struct PauseEvent(bool);
|
||||
///
|
||||
/// fn pause_system(mut time: ResMut<Time<Virtual>>, mut events: EventReader<PauseEvent>) {
|
||||
/// for ev in events.iter() {
|
||||
/// for ev in events.read() {
|
||||
/// if ev.0 {
|
||||
/// time.pause();
|
||||
/// } else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user