public class MainMenuScreen extends AbstractScreen
Modifier and Type | Field and Description |
---|---|
private com.badlogic.gdx.graphics.OrthographicCamera |
camera
This is the camera for the screen
|
private Menu |
menu
This is the menu element
|
private com.badlogic.gdx.utils.viewport.Viewport |
viewport
This is the viewpoint for the camera to take
|
game
Constructor and Description |
---|
MainMenuScreen(GameMain game)
The constructor for the MainMenuScreen
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
This is to be called when you want to dispose of all data
|
void |
hide()
This method is called when the user hides the window
|
void |
pause()
This is called when the focus is lost on the window
|
void |
render(float delta)
This method is called once a render loop to render the menu
|
void |
resize(int width,
int height)
This is called when the window is resized
|
void |
resume()
This method is called when the window is brought back into focus
|
void |
show()
This method is called to show the Menu Screen
|
void |
update()
This method is called once a tick
|
private Menu menu
private com.badlogic.gdx.graphics.OrthographicCamera camera
private com.badlogic.gdx.utils.viewport.Viewport viewport
public MainMenuScreen(GameMain game)
game
- - The game it is getting created forpublic void show()
show
in interface com.badlogic.gdx.Screen
show
in class AbstractScreen
public void update()
update
in class AbstractScreen
public void render(float delta)
render
in interface com.badlogic.gdx.Screen
render
in class AbstractScreen
delta
- - The time in seconds since the last drawpublic void resize(int width, int height)
resize
in interface com.badlogic.gdx.Screen
resize
in class AbstractScreen
width
- - The new widthheight
- - The new heightpublic void pause()
pause
in interface com.badlogic.gdx.Screen
pause
in class AbstractScreen
public void resume()
resume
in interface com.badlogic.gdx.Screen
resume
in class AbstractScreen
public void hide()
hide
in interface com.badlogic.gdx.Screen
hide
in class AbstractScreen
public void dispose()
dispose
in interface com.badlogic.gdx.Screen
dispose
in class AbstractScreen