bevy_event_extras
A small Bevy utility crate that extends App with ergonomic helpers for observer-based event propagation — including schedule-based triggers, single-condition propagators, and multi-condition propagators.
Motivation
Bevy's observer system is powerful, but common patterns — like "fire event B whenever event A fires", or "fire event C only after both event A and event B have fired" — require boilerplate. bevy_event_extras captures these patterns into a clean, chainable API directly on App.
Features
| Helper | Description |
|---|---|
trigger_on |
Fire an observer event on a given schedule |
add_propagator |
Re-trigger a new event whenever a given event fires |
add_multicondition_propagator |
Re-trigger a new event only after a set of events have all fired |
Example
use *;
use *;
;
;
;
;
Notes
- Order sensitivity: Conditions use a
PreUpdatepolling system, so there is a one-frame delay between all conditions being met and the output event firing. - Reset behavior: After the output event is triggered, all condition flags are reset to
false. This makes multi-condition propagators suitable for recurring sequences.
License
MIT OR Apache-2.0