Fix a missing .entity() -> .target()
conversion in observers example (#17363)
See title :)
This commit is contained in:
parent
eec5915da8
commit
ec611976ef
@ -142,7 +142,7 @@ fn on_remove_mine(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn explode_mine(trigger: Trigger<Explode>, query: Query<&Mine>, mut commands: Commands) {
|
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 id = trigger.target();
|
||||||
let Some(mut entity) = commands.get_entity(id) else {
|
let Some(mut entity) = commands.get_entity(id) else {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user