bevy/crates/bevy_ecs/src
Aevyrie 61b98ec80f
Rename trigger.entity() to trigger.target() (#16716)
# Objective

- A `Trigger` has multiple associated `Entity`s - the entity observing
the event, and the entity that was targeted by the event.
- The field `entity: Entity` encodes no semantic information about what
the entity is used for, you can already tell that it's an `Entity` by
the type signature!

## Solution

- Rename `trigger.entity()` to `trigger.target()`

---

## Changelog

- `Trigger`s are associated with multiple entities. `Trigger::entity()`
has been renamed to `Trigger::target()` to reflect the semantics of the
entity being returned.

## Migration Guide

- Rename `Trigger::entity()` to `Trigger::target()`.
- Rename `ObserverTrigger::entity` to `ObserverTrigger::target`
2024-12-08 21:55:09 +00:00
..
entity Flush commands after every mutation in WorldEntityMut (#16219) 2024-12-05 20:30:12 +00:00
event Window picking (#16103) 2024-12-05 21:14:39 +00:00
identifier Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
observer Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00
query Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
reflect Add Immutable Component Support (#16372) 2024-12-05 14:27:48 +00:00
schedule ✏️ Fix typos across bevy (#16702) 2024-12-08 01:18:39 +00:00
storage ✏️ Fix typos across bevy (#16702) 2024-12-08 01:18:39 +00:00
system Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
world Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00
archetype.rs Add Trigger::components, which lists the component targets that were triggered (#15811) 2024-10-15 02:17:03 +00:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Run observers before hooks for on_replace and on_remove (#16499) 2024-12-06 00:24:27 +00:00
change_detection.rs Migrate from Query::single and friends to Single (#15872) 2024-10-13 20:32:06 +00:00
component.rs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
intern.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
label.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
lib.rs Add World::try_resource_scope (#16707) 2024-12-08 15:40:09 +00:00
removal_detection.rs fix: add reflect to SceneInstanceReady and other observers/events (#16018) 2024-10-20 13:51:41 +00:00
result.rs Fallible systems (#16589) 2024-12-05 22:29:06 +00:00
traversal.rs Window picking (#16103) 2024-12-05 21:14:39 +00:00