Skip to content

Commit

Permalink
Fix a missing .entity() -> .target() conversion in observers example (
Browse files Browse the repository at this point in the history
#17363)

See title :)
  • Loading branch information
mweatherley authored Jan 14, 2025
1 parent eec5915 commit ec61197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/ecs/observers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn on_remove_mine(
}

fn explode_mine(trigger: Trigger<Explode>, query: Query<&Mine>, mut commands: Commands) {
// If a triggered event is targeting a specific entity you can access it with `.entity()`
// If a triggered event is targeting a specific entity you can access it with `.target()`
let id = trigger.target();
let Some(mut entity) = commands.get_entity(id) else {
return;
Expand Down

0 comments on commit ec61197

Please sign in to comment.