Edit release note
This commit is contained in:
parent
da204baeee
commit
ef6dbe2f90
@ -57,12 +57,12 @@ commands.trigger(Speak {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
To allow an event to be targeted at entities and even propagated further, you can also derive `EntityEvent`.
|
To allow an event to be targeted at entities and even propagated further, you can instead derive `EntityEvent`.
|
||||||
It supports optionally specifying some options for propagation using the `event` attribute:
|
It supports optionally specifying some options for propagation using the `event` attribute:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
// When the `Damage` event is triggered on an entity, bubble the event up to ancestors.
|
// When the `Damage` event is triggered on an entity, bubble the event up to ancestors.
|
||||||
#[derive(Event, EntityEvent)]
|
#[derive(EntityEvent)]
|
||||||
#[entity_event(traversal = &'static ChildOf, auto_propagate)]
|
#[entity_event(traversal = &'static ChildOf, auto_propagate)]
|
||||||
struct Damage {
|
struct Damage {
|
||||||
amount: f32,
|
amount: f32,
|
||||||
|
Loading…
Reference in New Issue
Block a user