- Updated
bevyto 0.18 - Updated
leafwing-input-managerto 0.20
serdefeature, which implementsSerializeandDeserializeforDone
- Updated
bevyto 0.17 - Updated
leafwing-input-managerto 0.18 - Renamed
on_eventtoon_message - State machine errors are handled by the default error handler
- Fixed
StateMachineresetting to its default value when a transition adds a disabled component
StateMachine::on_exit_fromandStateMachine::on_enter_toallow listening for transitions by the previous and next states. The difference between them is the former runs before the transition and the latter runs after.- Also added
StateMachine::command_on_exit_fromandStateMachine::command_on_enter_to - Implemented
EntityTriggerforBox<dyn EntityTrigger>
- Updated
bevyto 0.16 - Updated
leafwing-input-managerto 0.17
OneOfStateis a state that matches any state given in the tuple in its type parameterNotStateis a state that matches any state other than the one given in its type parameterTrigger::ignore_andis likeTrigger::and, but throws away the output of the first triggerStateMachinePlugin::schedulechanges the schedule in which transitions occur
- The behavior of
StateMachine::trans_builderhas changed. Now, builders can no longer reject a transition (instead of returningOption<MyState>, they returnMyState). Instead, builders are now mutable systems that acceptTrans(context for the transition) as an input.
- Fixed a panic when
StateMachineis removed during a transition
- Updated
bevyto 0.15 - Updated
leafwing-input-managerto 0.16 (see theirRELEASES.mdfor a migration guide)
- Updated
bevyto 0.14 - Updated
leafwing-input-managerto 0.14 - Renamed
TriggertoEntityTriggerto avoid conflict withbevy::prelude::Trigger
seldom_fn_pluginintegration
Outdefinitions to trigger combinator functions' return types
- Updated
bevyto 0.13 - Updated
leafwing-input-managerto 0.13
on_eventtrigger could detect events that occured before the latest transition
IntoSystemtrait, which allows systems which returnbool,Option, orResult, and acceptEntityor nothing as input, to be used as triggersTriggerIntrait, which allows systems which accept nothing as input to be used as triggersTriggerOuttrait, which allows triggers to outputboolorOptionwithoutBoolTriggerandOptionTriggerSystemTriggertype, which is also used for system triggers
transandtrans_buildereach have a new type parameter, which should simply be elided with_- Replaced all built-in trigger types with system equivalents
- Renamed
MachineStatetoEntityState Triggerhas anOuttype andinitandcheckfunctions, instead ofParam,Ok, andErrtypes and atriggerfunction
BoolTriggerandOptionTrigger
CloneandCopyimpls for triggers and other typesPartialEqandEqimpl forNever
- Updated
bevyto 0.12 - Updated
leafwing-input-managerto 0.11
- The
leafwing_inputfeature was a default feature
- Updated
bevyto 0.11 - Updated
leafwing-input-managerto 0.10
PressedTriggerfiring only once per pressAxisPairTriggerandClampedAxisPairTriggerfailing to fire without rotation bounds
triggermodule is public
- Transitions sometimes failing when there are multiple entities with state machines
EventTriggerre-export, making it accessible
Componentbound toMachineStateStateMachine::on_enterandStateMachine::on_exitthat acceptFn(&mut EntityCommands)StateMachine::command_on_enterandStateMachine::command_on_exitthat accept aCommandAndTriggerandOrTriggerthat combine triggers with boolean logicTrigger::not,Trigger::and, andTrigger::orcombinators that constructNotTrigger,AndTrigger, andOrTriggerrespectivelyEventTrigger<E>that triggers upon reading the eventStateMachine::set_trans_loggingfor logging transitionsStateMachine::with_stateto register states that are not used in any transitions
StateMachine::newhas been replaced withStateMachine::default, and you must insert the initial state manuallyStateMachine::trans_builder's callback accepts a reference to the current stateStateMachineno longer tracks the current state, so you may add and remove states manually- Transitions have priority in the order they are added to the
StateMachine Trigger::Paramis aReadOnlySystemParaminstead ofSystemParam, andTrigger::triggeraccepts it as an owned value, allowing them to useEventReader,Local, etc
TriggerPlugin,trigger_plugin,TriggerInputPluginandtrigger_input_plugin;Triggersno longer need to be registeredStateMachine::insert_on_enterandStateMachine::remove_on_exitReflectbound fromMachineStateandTrigger
- Updated
bevyto 0.10 - Updated
leafwing-input-managerto 0.9 AnyStateis uninhabited, so it cannot be constructed
insert_on_enterinserting on exit instead of enter
StateMachine::trans_builderbuilds a state based on data provided by the triggerAnyStatestate that can be used in type parameters to represent any stateleafwing_inputfeature for input-related triggers:ValueTrigger,ClampedValueTrigger,AxisPairTrigger,ClampedAxisPairTrigger,JustPressedTrigger,PressedTrigger,JustReleasedTrigger,ReleasedTrigger, andActionDataTriggerInputTriggerPlugin<Actionlike>for easily registering input-related triggersOptionTriggerandBoolTriggeroffer simpler APIs thanTriggerNevertype forTrigger::Errwhen the trigger always occurs
- A panic will occur when using a trigger that hasn't been registered
Triggerhas associated typesOkandErr, andTrigger::triggerreturns aResult<Self::Ok, Self::Err>, which are used in transition builders
CloneandFromReflectrequirements forTriggerClonefromStateMachineFromReflectre-export fromprelude
- Updated
bevyto 0.9 Trigger::Param<'w, 's>has lifetime parametersTrigger::triggeraccepts&Self::Param::Fetch::Iteminstead of&StaticSystemParam<Self::Param>DoneandDoneTriggerare enums withSuccessandFailurevariants
StaticSystemParamre-export frompreludeDone::success()andDone::failure()constructorsDoneTrigger::success()andDoneTrigger::failure()constructors
- Creating multiple transitions from the same
MachineStateandTriggertype doesn't panic
StateMachine::insert_on_enterconfigures theStateMachineto insert a bundle when entering a stateStateMachine::remove_on_exitconfigures theStateMachineto remove a bundle when exiting a stateStaticSystemParamandFromReflectare re-exported inprelude
Done::success()andDone::failure()constructorsDoneTrigger::success()andDoneTrigger::failure()constructors
MachineStates must implementBundleand don't need to implementComponentDoneTriggerandDoneeach have asuccessfield. So,DoneTriggerwill only trigger when aDonecomponent with a matchingsuccessfield is added.