You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear maintainers,
while working through this repo, I came across the following questions / remarks:
Why do we have both fsm and parentFSM and then we set parentFSM to be fsm? I do not see the added value of parentFsm in IStateMachine
Say I have a class MyState which has a property Priority of type int, and I want to only transition between two states (esepcially in TriggerTransitionFromAny, TransitionFromAny, etc, when fromState.priority <= toState.Priority.
The way I am currently implementing this is in a derived MyTransition class and a ShouldTransition override.
Here we see a limitation of the expandability of the current base classes. IStateMachine has no GetState and no ActiveState. This forces me to pass in the StateMachine into the constructor of the transition.
Are there any recommended ideas to implement this?
This is essentially a special case when the transition needs to know data from the states to decide whether it should allow a state change.
A similar "limitation" is that the StateBase.CanExit() does not know what state it was asked to exit to.
The text was updated successfully, but these errors were encountered:
Dear maintainers,
while working through this repo, I came across the following questions / remarks:
Why do we have both fsm and parentFSM and then we set parentFSM to be fsm? I do not see the added value of parentFsm in
IStateMachine
Say I have a class
MyState
which has a propertyPriority
of typeint
, and I want to only transition between two states (esepcially inTriggerTransitionFromAny
,TransitionFromAny
, etc, whenfromState.priority <= toState.Priority
.The way I am currently implementing this is in a derived
MyTransition
class and aShouldTransition
override.Here we see a limitation of the expandability of the current base classes.
IStateMachine
has noGetState
and noActiveState
. This forces me to pass in theStateMachine
into the constructor of the transition.Are there any recommended ideas to implement this?
This is essentially a special case when the transition needs to know data from the states to decide whether it should allow a state change.
A similar "limitation" is that the
StateBase.CanExit()
does not know what state it was asked to exit to.The text was updated successfully, but these errors were encountered: