Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use triggers per state machine layer
The PR has a lot of file changes, but most of them are updates of the API. Added comments on the relevant parts of the code. Currently, triggers used in conditions are only evaluated during the first state transition of a state machine layer. This prevents, for example, using multiple triggers in the same frame. Another recurring issue with our current implementation is that if a user has a state machine that initializes like this: ``` Entry ----> Idle --[trigger condition] --> Animation ``` And they fire the trigger before the animation plays, or at the same frame that the animation starts, the trigger will be ignored. This is not expected, as users want to be able to set all their inputs beforehand and then play the animation. This PR changes the approach, and instead of ignoring triggers after the first state update, it keeps track of which state machine layers have used the trigger. This allows for all triggers to be used once if they are available regardless of when they the condition is tested. **Note: the order in which triggers are fired doesn't affect the outcome. It could be an improvement later if we do care about the order.** Added a test for input triggers, I will add a test for view models once I finish the setup needed for testing view models overall. Diffs= f33a5984e2 use triggers per state machine layer (#8853)
- Loading branch information