bevy/examples/ecs
Charles 7d712406fe Simplify sending empty events (#2935)
# Objective

When using empty events, it can feel redundant to have to specify the type of the event when sending it.

## Solution

Add a new `fire()` function that sends the default value of the event. This requires that the event derives Default.


Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-02-04 01:24:47 +00:00
..
component_change_detection.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
ecs_guide.rs Thread local example cleanup (#3586) 2022-01-08 22:36:33 +00:00
event.rs Simplify sending empty events (#2935) 2022-02-04 01:24:47 +00:00
fixed_timestep.rs Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
hierarchy.rs Fix hierarchy example panic (#3378) 2021-12-20 20:33:38 +00:00
iter_combinations.rs Make the iter_combinators examples more pretty (#3075) 2022-01-06 19:13:52 +00:00
parallel_query.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
removal_detection.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
startup_system.rs Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
state.rs Fix doc_markdown lints in examples (#3486) 2021-12-29 17:25:34 +00:00
system_chaining.rs Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
system_param.rs Fix doc_markdown lints in examples (#3486) 2021-12-29 17:25:34 +00:00
system_sets.rs Add missing closing ticks for inline examples and some cleanup (#3573) 2022-01-07 09:25:12 +00:00
timers.rs Cleanup some things which shouldn't be components (#2982) 2022-02-03 23:56:57 +00:00