简体   繁体   中英

How to make a LevelMenu in libgdx?

I want make a simple game that the user will can to choose a level from the LevelMenu. I mean by that like the game "Angry Birds" or "Cut The Rope". Each ButtonLevel may have: locking, gave three stars. I can do this by creating for each image a button, but I think it won't be efficient. So I ask if there is a simple way to do this from libgdx?

Sorry for my poor english.

For the stars, you can create one texture and redraw it multiple times with no significant impact to the speed of your game.

You would only need to load two textures for the stars. One would have three dark stars, second one will have a bright star. Then to show 1/2/3 stars you just draw the bright stars multiple times on top of it.

For locking, you just create one lock texture and overlay it.

Glad to help :)

Comment this post if you want any more information :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM