setState
Sets the state of the state machine
Return
a Command that sets the state and ends instantly
Parameters
state
a factory that returns the state to set
Sets the state of the state machine
a Command that sets the state and ends instantly
a factory that returns the state to set