Hi guys. I am wondering about what the AppState.setEnabled does. So if i call AppState.setEnabled(false); does that run the cleanup() and basically de-initialize the state. Basically I am asking how should I use the AppState to transition from a Menu to the Game playing state. Any tips are greatly appreciated! Thanks!
Pretty sure setEnabled(false) just prevents the app state from having its update called. Only detaching it from the state manager would cause the de-initialize stuff to run.
…but you could always look at the state manager code to be sure. That’s what I’d do.
As @pspeed mentions, setting setEnabled to false will stop that appstate to be updated. It will still exist and be ready to be updated when switched back to enabled = true.