Games Levels using x2

developer_123

Active Member
Licensed User
Longtime User
Good night! I want to know if there is a correct way to set the diferents levels of my game using X2. I have three diferents levels create in Tiled, and I need put this levels in a Main menu. I'm thinking use diferents panel for each levels, but I don't know if this is the Best way to set it. I appreciate any example or thread that talk about it! Thanks.
 

ilan

Expert
Licensed User
Longtime User
In many of the examples (Mario is one of them) there is a GameOver method that restarts the game. You can do something similar, but change the level instead of starting from the beginning.

i think what he means is what kind of view should he use for the level menu.

the question is can xui2d work with simple native views?

the answer is yes. Unlike libgdx where it is not recommended to use native views inside the game in xui2d everything is happening on a panel so all u need to do is creating a new panel and put inside your buttons, labels what ever u want. Use the designer to build the ui for the levels and load it to the level panel. Then switch between game and level will be very simple.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…