Android Question libGDX: Stages and multiple screens

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
I'm confused on how to use the lgScreenManager in conjunction with a lgScn2DStage or are they mutually exclusive?

And if they are exclusive, how would you structure a game that had three separate stages (lgScn2DStage), e.g. an opening screen (with actors/animations of its own) a "level screen" where game play took place and a "game over" screen?

Thanks in advance
- Richard
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
I figured this one out myself, I missed the line in the lib introduction documentation on the screen manager:
The screens have the same life-cycle as the library, and thus the same events except that Create is named Show and Dispose is named Hide.
I was looking for a method to add the stage to the screen as you would add a table to the stage, but that becomes irrelevant since each screen has its own render event.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Hi

I am building now a libgdx game and that would interest me too. Do you have maybe a simple template where you handle all 3 screen together?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
There's a demo for the screens.

Yes you are right. I noticed that after i have posted here. It seems like you covered all libgdx features in your examples. I really appreciate your work and help. Thank you @Informatix :)

Should we expect new great libs from you in 2016??
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Yes you are right. I noticed that after i have posted here. It seems like you covered all libgdx features in your examples. I really appreciate your work and help. Thank you @Informatix :)

Should we expect new great libs from you in 2016??
I have still a game to finish and after that I will stop development for a while. I purchased a lot of games and I want to play them.
I wrote the tutorial to explain a few advanced techniques that I used in my Diktatour game, but I'm too busy (or lazy) currently to translate it. I hope I'll do that in 2016. ;)
 
Upvote 0
Top