Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Examples: Use multiple state machines #10

Open
0o-de-lally opened this issue Mar 20, 2021 · 0 comments
Open

Examples: Use multiple state machines #10

0o-de-lally opened this issue Mar 20, 2021 · 0 comments

Comments

@0o-de-lally
Copy link

0o-de-lally commented Mar 20, 2021

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant