Open FrostedMonkey opened 2 years ago
@FrostedMonkey
State<States, Events> getState(State<States, Events> initialState) {
if (!initialState.isSubmachineState()) {
return initialState;
}
StateMachine<States, Events> submachine =
((AbstractState<States, Events>) initialState).getSubmachine();
State<States, Events> state = submachine.getState();
return getState(state);
}
When I use ObjectStateMachine to retrieve the current state machine state, I get the top-level state. How do I get the child state