Apply suggestions from code review
Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
This commit is contained in:
parent
e91d6e41d7
commit
1d853754d6
@ -29,7 +29,7 @@ or an observer event with `EventReader`, leaving the user wondering why the even
|
||||
**Bevy 0.17** aims to solve this ambiguity by splitting the event traits into `Event`, `EntityEvent`, and `BufferedEvent`.
|
||||
|
||||
- `Event`: A shared trait for observer events.
|
||||
- `EntityEvent`: An observer `Event` that additionally supports targeting specific entities and propagating the event from one entity to another.
|
||||
- `EntityEvent`: An `Event` that additionally supports targeting specific entities and propagating the event from one entity to another.
|
||||
- `BufferedEvent`: An event that supports usage with `EventReader` and `EventWriter` for pull-based event handling.
|
||||
|
||||
## Using Events
|
||||
@ -92,7 +92,7 @@ let armor_piece = commands
|
||||
commands.trigger_targets(Damage { amount: 10.0 }, armor_piece);
|
||||
```
|
||||
|
||||
To allow an event to be used with the buffered API, you can derive `BufferedEvent`:
|
||||
To allow an event to be used with the buffered API, you can instead derive `BufferedEvent`:
|
||||
|
||||
```rust
|
||||
#[derive(BufferedEvent)]
|
||||
|
Loading…
Reference in New Issue
Block a user