Open inakie opened 6 years ago
Is there a way to add new transitions/states after the first call to the constructor?
I have tried doing this
fsm._fsm.config.mapTransition({ name: "startPause", from: "game", to: "pause" });
but I get a fsm.startPause is not a function error.
fsm.startPause is not a function
Check out this codepen for my test Thanks!
Not sure why you would want to do this -- the whole idea of a 'finite state' machine is that there are a finite number of possible states. Adding states/transitions dynamically kinda breaks that paradigm...
Is there a way to add new transitions/states after the first call to the constructor?
I have tried doing this
but I get a
fsm.startPause is not a function
error.Check out this codepen for my test Thanks!