-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hierarchical states (substates) through system ordering #11073
Comments
previous work: #9942 |
@MiniaczQ - I'd consider this more of a compliment to #10088. That PR doesn't actually provide built in hierarchical states, instead focusing on allowing a wider array of pattern matching options for the currently supported state types (which can be structs or enums, but currently only have a built-in way to handle full equality for matches). Overall I do like a lot of this approach, though I only had a cursory glance here. The text history around #9957 might give some context for how I ended up with #10088, and the removal of Conditional States (which were my attempt at handling hierarchy). - figured that older PR might be useful as a reference for prior work as well... |
Yeah, the more I work on a solution the less it collides with the state matching PR. A complementary to matching would be partial update through |
I think this covers the use case :) |
What problem does this solve or what need does it fill?
Bevy's state API is good for flat states, but it's hard to work with nested/hierarchical states.
What solution would you like?
Add API for adding substates and system ordering for propagating it same tick.
This also requires substates to be
inactive
when their parent isn't in the correct state.Prototype, tests double as examples.
What alternative(s) have you considered?
State pattern matching
Propagate it in multiple ticks
The text was updated successfully, but these errors were encountered: