2
0
Fork 0
mirror of https://github.com/bevyengine/bevy synced 2024-12-30 06:53:13 +00:00
bevy/crates/bevy_state
Phoqinu c6147e57f4
Make StateTransitionSteps public ()
# Objective

- Fixes  

## Solution

- `StateTransitionSteps` was made public

## Testing

- _Did you test these changes? If so, how?_
 I am now able to import it and use it.

---

## Showcase

- Users can now write their own state scoped resources

```rust
    fn init_state_scoped_resource<R: Resource + FromWorld>(
        &mut self,
        state: impl States,
    ) -> &mut Self {
        use bevy::state::state::StateTransitionSteps; // this PR in action

        self.add_systems(
            StateTransition,
            (
                clear_state_scoped_resource_impl::<_, R>(state.clone())
                    .in_set(StateTransitionSteps::ExitSchedules), // and here
                init_state_scoped_resource_impl::<_, R>(state)
                    .in_set(StateTransitionSteps::EnterSchedules), // here too
            ),
        );

        self
    }
```
2024-12-03 19:48:00 +00:00
..
macros enable_state_scoped_entities() as a derive attribute () 2024-12-01 20:09:36 +00:00
src Make StateTransitionSteps public () 2024-12-03 19:48:00 +00:00
Cargo.toml Move all_tuples to a new crate () 2024-12-03 17:41:09 +00:00