bevy/crates/bevy_picking/src
Christian Hughes 219b5930f1
Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754)
# Objective

- Closes #15752

Calling the functions `App::observe` and `World::observe` doesn't make
sense because you're not "observing" the `App` or `World`, you're adding
an observer that listens for an event that occurs *within* the `World`.
We should rename them to better fit this.

## Solution

Renames:
- `App::observe` -> `App::add_observer`
- `World::observe` -> `World::add_observer`
- `Commands::observe` -> `Commands::add_observer`
- `EntityWorldMut::observe_entity` -> `EntityWorldMut::observe`

(Note this isn't a breaking change as the original rename was introduced
earlier this cycle.)

## Testing

Reusing current tests.
2024-10-09 15:39:29 +00:00
..
backend.rs Rename the Pickable component and fix incorrect documentation (#15707) 2024-10-07 17:09:57 +00:00
events.rs Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754) 2024-10-09 15:39:29 +00:00
focus.rs Rename the Pickable component and fix incorrect documentation (#15707) 2024-10-07 17:09:57 +00:00
input.rs Migrate bevy picking (#15690) 2024-10-07 16:26:37 +00:00
lib.rs Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754) 2024-10-09 15:39:29 +00:00
pointer.rs Migrate bevy picking (#15690) 2024-10-07 16:26:37 +00:00