The Start screen and disposal
So, here we are back with Flappee Bee. The first thing we should tackle is having a Start screen, or menu screen, depending on what you want to call it. This Screen
class will be built entirely with Scene2d.ui components and you will be mesmerized by how awesome all this is.
First things first; let's decide what we will have on our start screen. We will need a play button and some text, perhaps also a title image on the screen.
Let's create our StartScreen
class and add the Stage
classes to it:
public class StartScreen extends ScreenAdapter { private static final float WORLD_WIDTH = 480; private static final float WORLD_HEIGHT = 640; private Stage stage; public void show() { stage = new Stage(new FitViewport(WORLD_WIDTH, ...
Get LibGDX Game Development By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.