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

Examples: Use multiple state machines #10

@0o-de-lally

Description

@0o-de-lally

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions