sm
sm copied to clipboard
Examples: Use multiple state machines
I have this case where I'd like to have two state machines (which interact with each other) and to have the state transitions happen external to the module where they are defined. Any tips?
I'm having a bit of trouble wrapping my head around exporting the Variants of the state machine. It's not clear to me how to re-export the objects of the sm! macro.
sm::sm! {
GameState {
InitialStates { Start }
}
}
When I try to use elsewhere it I get:
`GameState` is private, and cannot be re-exported
consider declaring type or module `NodeState` with `pub`
Not clear how to declare as pub. Tips?