bevy/benches/benches
Zachary Harrold 20813aed64
Handle TriggerTargets that are combinations for components/entities (#18024)
# Objective

* Fixes https://github.com/bevyengine/bevy/issues/14074
* Applies CI fixes for #16326

It is currently not possible to issues a trigger that targets a specific
list of components AND a specific list of entities

## Solution

We can now use `((A, B), (entity_1, entity_2))` as a trigger target, as
well as the reverse

## Testing

Added a unit test.

The triggering rules for observers are quite confusing:

Triggers once per entity target

For each entity target, an observer system triggers if any of its
components matches the trigger target components (but it triggers at
most once, since we use an internal counter to make sure that an
observer can run at most once per entity target)

(copied from #14563)
(copied from #16326)

## Notes

All credit to @BenjaminBrienen and @cBournhonesque! Just applying a
small fix to this PR so it can be merged.

---------

Co-authored-by: Benjamin Brienen <Benjamin.Brienen@outlook.com>
Co-authored-by: Christian Hughes <xdotdash@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-02-24 23:57:34 +00:00
..
bevy_ecs Handle TriggerTargets that are combinations for components/entities (#18024) 2025-02-24 23:57:34 +00:00
bevy_math Overhaul bezier curve benchmarks (#17016) 2024-12-29 20:55:08 +00:00
bevy_picking Overhaul picking benchmarks (#17033) 2024-12-30 21:04:24 +00:00
bevy_reflect Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_render Migrate to core::hint::black_box() (#16980) 2024-12-29 19:33:42 +00:00
bevy_tasks Migrate to core::hint::black_box() (#16980) 2024-12-29 19:33:42 +00:00