mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
70a38ab1f6
# Objective - My attempt at fulfilling #13629. ## Solution Renames the `and_then` / `or_else` run condition methods to `and` / `or`, respectively. Extends the run conditions API to include a suite of binary logical operators: - `and` - `or` - `nand` - `nor` - `xor` - `xnor` ## Testing - Did you test these changes? If so, how? - The test **run_condition_combinators** was extended to include the added run condition combinators. A **double_counter** system was added to test for combinators running on even count cycles. - Are there any parts that need more testing? - I'm not too sure how I feel about the "counter" style of testing but I wanted to keep it consistent. If it's just a unit test I would prefer simply to just assert `true` == _combinator output_ or `false` == _combinator output_ . - How can other people (reviewers) test your changes? Is there anything specific they need to know? - Nothing too specific. The added methods should be equivalent to the logical operators they are analogous to (`&&` , `||`, `^`, `!`). - If relevant, what platforms did you test these changes on, and are there any important ones you can't test? - Should not be relevant, I'm using Windows. ## Changelog - What changed as a result of this PR? - The run conditions API. - If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings - Changed: - `and_then` run condition combinator renamed to simply `and` - `or_else` run condition combinator renamed to simply `or` - Added: - `nand` run condition combinator. - `nor` run condition combinator. - `xor` run condition combinator. - `xnor` run condition combinator. ## Migration Guide - The `and_then` run condition method has been replaced with the `and` run condition method. - The `or_else` run condition method has been replaced with the `or` run condition method. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Andres O. Vela <andresovela@users.noreply.github.com> |
||
---|---|---|
.. | ||
component_change_detection.rs | ||
component_hooks.rs | ||
custom_query_param.rs | ||
custom_schedule.rs | ||
dynamic.rs | ||
ecs_guide.rs | ||
event.rs | ||
fixed_timestep.rs | ||
generic_system.rs | ||
hierarchy.rs | ||
iter_combinations.rs | ||
nondeterministic_system_order.rs | ||
one_shot_systems.rs | ||
parallel_query.rs | ||
removal_detection.rs | ||
run_conditions.rs | ||
send_and_receive_events.rs | ||
startup_system.rs | ||
system_closure.rs | ||
system_param.rs | ||
system_piping.rs | ||
system_stepping.rs |