mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
07aa9e5641
# Objective Prerequisite to #13579. Combine separate `Substates` transition systems to centralize transition logic and exert more control over it. ## Solution Originally the transition happened in 2 stages: - `apply_state_transition` in `ManualTransitions` handled `NextState`, - closure system in `DependentTransitions` handled parent-related changes, insertion and deletion of the substate. Now: - Both transitions are processed in a single closure system during `DependentTransitions`. - Since `Substates` no longer use `ManualTransitions`, it's been renamed to `RootTransitions`. Only root states use it. - When `Substates` state comes into existence, it will try to initialize from `NextState` and fallback to `should_exist` result. - Remove `apply_state_transition` from public API. Consequentially, removed the possibility of multiple `StateTransitionEvent`s when both transition systems fire in a single frame. ## Changelog - Renamed `ManualTransitions` to `RootTransitions`. - `Substates` will initialize their value with `NextState` if available and fallback to `should_exist` result. ## Migration Guide - `apply_state_transition` is no longer publicly available, run the `StateTransition` schedule instead. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_state | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |