Hi guys! I have a question that makes me thinking: is it possible to detach an appstate inside an appstate?
An example: I have the GameplayAppState, and I want to switch to the menu. Something like stateManager.getState(GameplayAppState).detach(). I have been using the cleanup() method, but the update() loop keeps running. How do I do it?
I tried to do that, but I detach my appstate inside the onAction() method of the ActionListener. In that case, this refers to ActionListener. But can I make this refer to the appstate inside that method?