Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

libGDX best way to do Game States

$
0
0

I’m making a JRPG in libGDX, and I’m working with Screens. I have a main Screen called GameScreen, a screen for battles called BattleScreen and I want to make a screen for managing party members and items, as well as for shops. My question is, how can I draw one of those 3 screens without having to reload the whole game when going back to GameScreen.

GameScreen loads everything when Show() is called, so I’ll have to save all information everytime I call another screen, so I can continue when I go back to GameScreen. This of course isn’t good, and I’m looking for another way to draw a Screen over another one so that all vars wont be lost, or another solution.


Viewing all articles
Browse latest Browse all 434

Trending Articles