@@ -86,29 +86,29 @@ This month, [seldom_state] 0.6 was released:
86
86
87
87
- Triggers don't need to be registered!
88
88
- ` StateMachine::new(MachineState) ` has been replaced with
89
- ` StateMachine::default() ` , and you must insert the initial state manually
89
+ ` StateMachine::default() ` , and you must insert the initial state manually
90
90
- ` MachineState ` requires ` Component ` now instead of ` Bundle `
91
91
- ` MachineState ` and ` Trigger ` no longer require ` Reflect `
92
92
- ` StateMachine ` 's
93
- ` trans_builder(Trigger, Fn(&Trigger::Ok) -> Option<MyNextState>) ` is now
94
- ` trans_builder(Trigger, Fn(&MyCurrentState, Trigger::Ok) -> Option<MyNextState>) ` ,
95
- so you can take information from the current state when building the next!
93
+ ` trans_builder(Trigger, Fn(&Trigger::Ok) -> Option<MyNextState>) ` is now
94
+ ` trans_builder(Trigger, Fn(&MyCurrentState, Trigger::Ok) -> Option<MyNextState>) ` ,
95
+ so you can take information from the current state when building the next!
96
96
- ` StateMachine ` no longer tracks the current state, so you may add and remove
97
- state components manually, as long as it's still in one state. Manual state
98
- changes won't trigger ` on_enter ` etc events. States that aren't used in any
99
- transitions can be registered manually with ` StateMachine::with_state ` , else it
100
- will think it isn't in a state and panic.
97
+ state components manually, as long as it's still in one state. Manual state
98
+ changes won't trigger ` on_enter ` etc events. States that aren't used in any
99
+ transitions can be registered manually with ` StateMachine::with_state ` , else it
100
+ will think it isn't in a state and panic.
101
101
- Replaced ` StateMachine ` 's ` insert_on_enter(Bundle) ` and ` remove_on_exit() `
102
- with the more versatile ` on_enter(Fn(&mut EntityCommands)) ` ,
103
- ` on_exit(Fn(&mut EntityCommands)) ` , ` command_on_enter(Command) ` , and
104
- ` command_on_exit(Command) `
102
+ with the more versatile ` on_enter(Fn(&mut EntityCommands)) ` ,
103
+ ` on_exit(Fn(&mut EntityCommands)) ` , ` command_on_enter(Command) ` , and
104
+ ` command_on_exit(Command) `
105
105
- ` Trigger ` s may be combined with combinators ` not ` , ` and ` , and ` or `
106
106
- Transitions have priority in the order they are added
107
107
- ` Trigger::trigger ` accepts ` ReadOnlySystemParam ` instead of ` &SystemParam ` , so
108
- you can use ` EventReader ` , ` Local ` , etc in your triggers!
108
+ you can use ` EventReader ` , ` Local ` , etc in your triggers!
109
109
- Added an ` EventTrigger<E> ` that triggers on an event
110
110
- ` StateMachine::set_trans_logging ` sets whether to log state transitions for
111
- debugging
111
+ debugging.
112
112
113
113
Thanks to [ Sera] for coauthoring this update!
114
114
0 commit comments