Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State inner class doesn't have a set_state_machine(StateMachine) function #15

Open
JFerrerBeired opened this issue Jun 18, 2020 · 0 comments

Comments

@JFerrerBeired
Copy link

The StateMachine.set_state_machine(states: Array) calls State.set_state_machine(self) for each element in the states array, but the inner class State doesn't have such method.

Then if I try the following line from the README.md it obviously doesn't work:

# Convenience method to set state machine on array of states
sm.set_state_machine([idle_state, patrol_state])

I imagine that the expected behaviour is that the State class has a setter function for the state_machine property called set_state_machine that is not implemented.

I've been just reading the source code and not used it already so I'm not sure about that. At first glance I don't know why you should use such thing given that StateMachine.set_state(state_id: String, state: State) actually sets the State.state_machine property to self

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

No branches or pull requests

1 participant