Package com.devcharles.piazzapanic
Class MainMenuScreen
java.lang.Object
com.badlogic.gdx.ApplicationAdapter
com.devcharles.piazzapanic.MainMenuScreen
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener
,com.badlogic.gdx.Screen
public class MainMenuScreen
extends com.badlogic.gdx.ApplicationAdapter
implements com.badlogic.gdx.Screen
Main menu of the game, transitions the player to the Tutorial
Slideshow
on button press-
Field Summary
Modifier and TypeFieldDescriptionprivate com.badlogic.gdx.graphics.g2d.Batch
(package private) com.badlogic.gdx.graphics.OrthographicCamera
(package private) final PiazzaPanic
private com.badlogic.gdx.graphics.g2d.BitmapFont
private com.badlogic.gdx.scenes.scene2d.ui.Skin
private com.badlogic.gdx.graphics.g2d.Sprite
private com.badlogic.gdx.scenes.scene2d.Stage
private com.badlogic.gdx.scenes.scene2d.ui.Label
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Called when theApplication
is destroyed.void
hide()
Called when this screen is no longer the current screen for aGame
.void
render
(float delta) Called when the screen should render itself.void
resize
(int width, int height) Called when theApplication
is resized.void
show()
Called when this screen becomes the current screen for aGame
.Methods inherited from class com.badlogic.gdx.ApplicationAdapter
create, pause, render, resume
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.badlogic.gdx.Screen
pause, resume
-
Field Details
-
game
-
camera
com.badlogic.gdx.graphics.OrthographicCamera camera -
stage
private com.badlogic.gdx.scenes.scene2d.Stage stage -
skin
private com.badlogic.gdx.scenes.scene2d.ui.Skin skin -
batch
private com.badlogic.gdx.graphics.g2d.Batch batch -
sprite
private com.badlogic.gdx.graphics.g2d.Sprite sprite -
gamesFont
private com.badlogic.gdx.graphics.g2d.BitmapFont gamesFont -
title
private com.badlogic.gdx.scenes.scene2d.ui.Label title
-
-
Constructor Details
-
MainMenuScreen
-
-
Method Details
-
show
public void show()Description copied from interface:com.badlogic.gdx.Screen
Called when this screen becomes the current screen for aGame
.- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta) Description copied from interface:com.badlogic.gdx.Screen
Called when the screen should render itself.- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Parameters:
delta
- The time in seconds since the last render.
-
resize
public void resize(int width, int height) Description copied from interface:com.badlogic.gdx.ApplicationListener
Called when theApplication
is resized. This can happen at any point during a non-paused state but will never happen before a call toApplicationListener.create()
.- Specified by:
resize
in interfacecom.badlogic.gdx.ApplicationListener
- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
- Overrides:
resize
in classcom.badlogic.gdx.ApplicationAdapter
- Parameters:
width
- the new width in pixelsheight
- the new height in pixels- See Also:
-
ApplicationListener.resize(int, int)
-
hide
public void hide()Description copied from interface:com.badlogic.gdx.Screen
Called when this screen is no longer the current screen for aGame
.- Specified by:
hide
in interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.ApplicationListener
Called when theApplication
is destroyed. Preceded by a call toApplicationListener.pause()
.- Specified by:
dispose
in interfacecom.badlogic.gdx.ApplicationListener
- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
- Overrides:
dispose
in classcom.badlogic.gdx.ApplicationAdapter
-